Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Zend_ProgressBar_Adapter_JsPush Class Reference
Inheritance diagram for Zend_ProgressBar_Adapter_JsPush:
Zend_ProgressBar_Adapter

Public Member Functions

 setUpdateMethodName ($methodName)
 
 setFinishMethodName ($methodName)
 
 notify ($current, $max, $percent, $timeTaken, $timeRemaining, $text)
 
 finish ()
 
- Public Member Functions inherited from Zend_ProgressBar_Adapter
 __construct ($options=null)
 
 setConfig (Zend_Config $config)
 
 setOptions (array $options)
 
 notify ($current, $max, $percent, $timeTaken, $timeRemaining, $text)
 
 finish ()
 

Protected Member Functions

 _outputData ($data)
 

Protected Attributes

 $_updateMethodName = 'Zend_ProgressBar_Update'
 
 $_finishMethodName
 
- Protected Attributes inherited from Zend_ProgressBar_Adapter
 $_skipOptions
 

Detailed Description

Definition at line 40 of file JsPush.php.

Member Function Documentation

◆ _outputData()

_outputData (   $data)
protected

Outputs given data the user agent.

This split-off is required for unit-testing.

Parameters
string$data
Returns
void

Definition at line 138 of file JsPush.php.

139  {
140  // 1024 padding is required for Safari, while 256 padding is required
141  // for Internet Explorer. The <br /> is required so Safari actually
142  // executes the <script />
143  echo str_pad($data . '<br />', 1024, ' ', STR_PAD_RIGHT) . "\n";
144 
145  flush();
146  ob_flush();
147  }

◆ finish()

finish ( )

Defined by Zend_ProgressBar_Adapter_Interface

Returns
void

Definition at line 117 of file JsPush.php.

118  {
119  if ($this->_finishMethodName === null) {
120  return;
121  }
122 
123  $data = '<script type="text/javascript">'
124  . 'parent.' . $this->_finishMethodName . '();'
125  . '</script>';
126 
127  $this->_outputData($data);
128  }

◆ notify()

notify (   $current,
  $max,
  $percent,
  $timeTaken,
  $timeRemaining,
  $text 
)

Defined by Zend_ProgressBar_Adapter_Interface

Parameters
float$currentCurrent progress value
float$maxMax progress value
float$percentCurrent percent value
integer$timeTakenTaken time in seconds
integer$timeRemainingRemaining time in seconds
string$textStatus text
Returns
void

Definition at line 93 of file JsPush.php.

94  {
95  $arguments = array(
96  'current' => $current,
97  'max' => $max,
98  'percent' => ($percent * 100),
99  'timeTaken' => $timeTaken,
100  'timeRemaining' => $timeRemaining,
101  'text' => $text
102  );
103 
104  $data = '<script type="text/javascript">'
105  . 'parent.' . $this->_updateMethodName . '(' . Zend_Json::encode($arguments) . ');'
106  . '</script>';
107 
108  // Output the data
109  $this->_outputData($data);
110  }
if($this->helper('Magento\Tax\Helper\Data') ->displayFullSummary()) foreach( $block->getTotal() ->getFullInfo() as $info)(isset($info['hidden']) && $info['hidden']) $percent
Definition: tax.phtml:33
endifif( $block->getLastPageNum()>1)( 'Page') ?></strong >< ul class $text
Definition: pager.phtml:43
$arguments
static encode($valueToEncode, $cycleCheck=false, $options=array())
Definition: Json.php:130

◆ setFinishMethodName()

setFinishMethodName (   $methodName)

Set the finish method name

Parameters
string$methodName
Returns
Zend_ProgressBar_Adapter_JsPush

Definition at line 75 of file JsPush.php.

76  {
77  $this->_finishMethodName = $methodName;
78 
79  return $this;
80  }

◆ setUpdateMethodName()

setUpdateMethodName (   $methodName)

Set the update method name

Parameters
string$methodName
Returns
Zend_ProgressBar_Adapter_JsPush

Definition at line 62 of file JsPush.php.

63  {
64  $this->_updateMethodName = $methodName;
65 
66  return $this;
67  }

Field Documentation

◆ $_finishMethodName

$_finishMethodName
protected

Definition at line 54 of file JsPush.php.

◆ $_updateMethodName

$_updateMethodName = 'Zend_ProgressBar_Update'
protected

Definition at line 47 of file JsPush.php.


The documentation for this class was generated from the following file: