toArray(); } if (is_array($options)) { $this->setOptions($options); } } /** * Returns one or all set options * * @param string $option (Optional) Option to return * @return mixed */ public function getOptions($option = null) { if ($option === null) { return $this->_options; } if (!array_key_exists($option, $this->_options)) { return null; } return $this->_options[$option]; } /** * Sets all or one option * * @param array $options * @return Zend_Filter_Compress_Bz2 */ public function setOptions(array $options) { foreach ($options as $key => $option) { $method = 'set' . $key; if (method_exists($this, $method)) { $this->$method($option); } } return $this; } }