Пример #1
0
 /**
  * Call the adapters finish() behaviour
  *
  * @return void
  */
 public function finish()
 {
     if ($this->_persistenceNamespace !== null) {
         unset($this->_persistenceNamespace->isSet);
     }
     $this->_adapter->finish();
 }
Пример #2
0
 /**
  * Defined by Zend_ProgressBar_Adapter
  *
  * @param null|array|Zend_Config $options
  */
 public function __construct($options = null)
 {
     // Call parent constructor with options
     parent::__construct($options);
     // Check if a width was set, else use auto width
     if ($this->_width === null) {
         $this->setWidth();
     }
 }
Пример #3
0
 /**
  * Defined by Zend_ProgressBar_Adapter
  *
  * @param null|array|Zend_Config $options
  */
 public function __construct($options = null)
 {
     // If STDOUT isn't defined, open a local resource
     if (!defined('STDOUT')) {
         $this->_stdout = fopen('php://stdout', 'w');
     }
     // Call parent constructor with options
     parent::__construct($options);
     // Check if a width was set, else use auto width
     if ($this->_width === null) {
         $this->setWidth();
     }
 }
Пример #4
0
 /**
  * The communication adapter for the ProgressBar.
  *
  * @param \Zend_ProgressBar_Adapter_Interface $adapter
  * @return \MUtil_Html_ProgressPanel (continuation pattern)
  */
 public function setProgressBarAdapter(\Zend_ProgressBar_Adapter $adapter)
 {
     if ($adapter instanceof \Zend_ProgressBar_Adapter_JsPush) {
         $prefix = $this->getFunctionPrefix();
         // Set the fields, in case they where not set earlier
         $adapter->setUpdateMethodName($prefix . 'Update');
         $adapter->setFinishMethodName($prefix . 'Finish');
     }
     $this->progressBarAdapter = $adapter;
     return $this;
 }