getOptions(); if (null === $this->_saveHandler && isset($options['saveHandler'])) { $saveHandler = $options['saveHandler']; if (is_array($saveHandler)) { if (!array_key_exists('class', $saveHandler)) { throw new Zend_Application_Resource_Exception('Session save handler class not provided in options'); } if (array_key_exists('options', $saveHandler)) { $options = $saveHandler['options']; } $saveHandler = $saveHandler['class']; $saveHandler = new $saveHandler($options); } elseif (is_string($saveHandler)) { $saveHandler = new $saveHandler(); } if (!$saveHandler instanceof Zend_Session_SaveHandler_Interface) { throw new Zend_Application_Resource_Exception('Invalid session save handler'); } $this->_saveHandler = $saveHandler; } return $this->_saveHandler; } /** * Defined by Zend_Application_Resource_Resource * * @return void */ public function init() { $options = array_change_key_case($this->getOptions(), CASE_LOWER); if (isset($options['savehandler'])) { unset($options['savehandler']); } if (count($options) > 0) { Zend_Session::setOptions($options); } $saveHandler = $this->getSaveHandler(); if ($saveHandler !== null) { Zend_Session::setSaveHandler($saveHandler); } } }