setOptions($options); } elseif ($options instanceof Zend_Config) { $this->setConfig($options); } } /** * Set options via a Zend_Config instance * * @param Zend_Config $config * @return Zend_ProgressBar_Adapter */ public function setConfig(Zend_Config $config) { $this->setOptions($config->toArray()); return $this; } /** * Set options via an array * * @param array $options * @return Zend_ProgressBar_Adapter */ public function setOptions(array $options) { foreach ($options as $key => $value) { if (in_array(strtolower($key), $this->_skipOptions)) { continue; } $method = 'set' . ucfirst($key); if (method_exists($this, $method)) { $this->$method($value); } } return $this; } /** * Notify the adapter about an update * * @param float $current Current progress value * @param float $max Max progress value * @param float $percent Current percent value * @param integer $timeTaken Taken time in seconds * @param integer $timeRemaining Remaining time in seconds * @param string $text Status text * @return void */ abstract public function notify($current, $max, $percent, $timeTaken, $timeRemaining, $text); /** * Called when the progress is explicitly finished * * @return void */ abstract public function finish(); }