本文整理匯總了PHP中Zend_ProgressBar_Adapter類的典型用法代碼示例。如果您正苦於以下問題:PHP Zend_ProgressBar_Adapter類的具體用法?PHP Zend_ProgressBar_Adapter怎麽用?PHP Zend_ProgressBar_Adapter使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了Zend_ProgressBar_Adapter類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: __construct
/**
* 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();
}
}
示例2: __construct
/**
* 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();
}
}
示例3: setProgressBarAdapter
/**
* 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;
}
示例4: finish
/**
* Call the adapters finish() behaviour
*
* @return void
*/
public function finish()
{
if ($this->_persistenceNamespace !== null) {
unset($this->_persistenceNamespace->isSet);
}
$this->_adapter->finish();
}