Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * 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;
 }
Ejemplo n.º 3
0
 /**
  * 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;
     }
 }