/** * destroy() - This is used to destroy session data, and optionally, the session cookie itself * * @param bool $remove_cookie - OPTIONAL remove session id cookie, defaults to true (remove cookie) * @param bool $readonly - OPTIONAL remove write access (i.e. throw error if Zend_Session's attempt writes) * @return void */ public static function destroy($remove_cookie = true, $readonly = true) { if (self::$_unitTestEnabled) { return; } if (self::$_destroyed) { return; } if ($readonly) { parent::$_writable = false; } session_destroy(); self::$_destroyed = true; if ($remove_cookie) { self::expireSessionCookie(); } }
/** * Ifw Hack for using Zend_Session in WordPress context if session is already started * @param $started */ public static function setStarted($started) { if ($started === true) { self::$_sessionStarted = true; parent::$_readable = true; parent::$_writable = true; } }