/** * writeClose() - Shutdown the sesssion, close writing and detach $_SESSION from the back-end storage mechanism. * This will complete the internal data transformation on this request. * * @param bool $readonly - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes) * @return void */ public static function writeClose($readonly = true) { if (self::$_writeClosed) { return; } if ($readonly) { parent::$_writable = false; } if (!self::$_unitTestEnabled) { session_write_close(); session_id(''); } session_write_close(); self::$_writeClosed = true; self::$_sessionStarted = false; self::$_defaultOptionsSet = false; }
/** * writeClose() - Shutdown the sesssion, close writing and detach $_SESSION from the back-end storage mechanism. * This will complete the internal data transformation on this request. * * @param bool $readonly - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes) * @return void */ public static function writeClose($readonly = true) { if (self::$_unitTestEnabled) { return; } if (self::$_writeClosed) { return; } if ($readonly) { parent::$_writable = false; } session_write_close(); self::$_writeClosed = true; }
/** * writeClose() - Shutdown the sesssion, close writing and detach $_SESSION from the back-end storage mechanism. * This will complete the internal data transformation on this request. * * @param bool $readonly - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes) * @return void */ public static function writeClose($readonly = true) { if (self::$_unitTestEnabled) { return; } if (self::$_writeClosed) { return; } if ($readonly) { parent::$_writable = false; } if (isset($_SESSION)) { $sessionBkp = $_SESSION; $_SESSION = array('data' => base64_encode(serialize($_SESSION))); } session_write_close(); self::$_writeClosed = true; if (isset($sessionBkp)) { $_SESSION = $sessionBkp; } }