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

Public Member Functions

 __construct ($options=null)
 
 setConfig (Zend_Config $config)
 
 setOptions (array $options)
 
 notify ($current, $max, $percent, $timeTaken, $timeRemaining, $text)
 
 finish ()
 

Protected Attributes

 $_skipOptions
 

Detailed Description

Definition at line 30 of file Adapter.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $options = null)

Create a new adapter

$options may be either be an array or a Zend_Config object which specifies adapter related options.

Parameters
null | array | Zend_Config$options

Definition at line 50 of file Adapter.php.

51  {
52  if (is_array($options)) {
53  $this->setOptions($options);
54  } elseif ($options instanceof Zend_Config) {
55  $this->setConfig($options);
56  }
57  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
setConfig(Zend_Config $config)
Definition: Adapter.php:65
setOptions(array $options)
Definition: Adapter.php:78

Member Function Documentation

◆ finish()

finish ( )
abstract

Called when the progress is explicitly finished

Returns
void

◆ notify()

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

Notify the adapter about an update

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

◆ setConfig()

setConfig ( Zend_Config  $config)

Set options via a Zend_Config instance

Parameters
Zend_Config$config
Returns
Zend_ProgressBar_Adapter

Definition at line 65 of file Adapter.php.

66  {
67  $this->setOptions($config->toArray());
68 
69  return $this;
70  }
setOptions(array $options)
Definition: Adapter.php:78

◆ setOptions()

setOptions ( array  $options)

Set options via an array

Parameters
array$options
Returns
Zend_ProgressBar_Adapter

Definition at line 78 of file Adapter.php.

79  {
80  foreach ($options as $key => $value) {
81  if (in_array(strtolower($key), $this->_skipOptions)) {
82  continue;
83  }
84 
85  $method = 'set' . ucfirst($key);
86  if (method_exists($this, $method)) {
87  $this->$method($value);
88  }
89  }
90 
91  return $this;
92  }
$value
Definition: gender.phtml:16
$method
Definition: info.phtml:13

Field Documentation

◆ $_skipOptions

$_skipOptions
protected
Initial value:
= array(
'options',
'config',
)

Definition at line 37 of file Adapter.php.


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