/** * setSaveHandler() - Session Save Handler assignment * * @param Zend_Session_SaveHandler_Interface $interface * @return void */ public static function setSaveHandler(Zend_Session_SaveHandler_Interface $saveHandler) { self::$_saveHandler = $saveHandler; if (self::$_unitTestEnabled) { return; } session_set_save_handler(array(&$saveHandler, 'open'), array(&$saveHandler, 'close'), array(&$saveHandler, 'read'), array(&$saveHandler, 'write'), array(&$saveHandler, 'destroy'), array(&$saveHandler, 'gc')); }
/** * setSaveHandler() - Session Save Handler assignment * * @param Zend_Session_SaveHandler_Interface $interface * @throws Zend_Session_Exception When the session_set_save_handler call fails * @return void */ public static function setSaveHandler(Zend_Session_SaveHandler_Interface $saveHandler) { self::$_saveHandler = $saveHandler; if (self::$_unitTestEnabled) { return; } $result = session_set_save_handler(array(&$saveHandler, 'open'), array(&$saveHandler, 'close'), array(&$saveHandler, 'read'), array(&$saveHandler, 'write'), array(&$saveHandler, 'destroy'), array(&$saveHandler, 'gc')); if (!$result) { throw new Zend_Session_Exception('Unable to set session handler'); } }