Cake\Network\Session::destroy PHP Метод

destroy() публичный Метод

Helper method to destroy invalid sessions.
public destroy ( ) : void
Результат void
    public function destroy()
    {
        if ($this->_hasSession() && !$this->started()) {
            $this->start();
        }
        if (!$this->_isCLI && session_status() === PHP_SESSION_ACTIVE) {
            session_destroy();
        }
        $_SESSION = [];
        $this->_started = false;
    }

Usage Example

Пример #1
0
 /**
  * Used to destroy sessions
  *
  * In your controller: $this->Session->destroy();
  *
  * @return void
  * @link http://book.cakephp.org/2.0/en/core-libraries/components/sessions.html#SessionComponent::destroy
  */
 public function destroy()
 {
     return Session::destroy();
 }
All Usage Examples Of Cake\Network\Session::destroy