yii\web\DbSession::destroySession PHP Method

destroySession() public method

Do not call this method directly.
public destroySession ( string $id ) : boolean
$id string session ID
return boolean whether session is destroyed successfully
    public function destroySession($id)
    {
        $this->db->createCommand()->delete($this->sessionTable, ['id' => $id])->execute();
        return true;
    }

Usage Example

Example #1
0
 /**
  * Session destroy handler.
  * Do not call this method directly.
  * @param string $id session ID
  * @return boolean whether session is destroyed successfully
  */
 public function destroySession($id)
 {
     if ($this->dbSession) {
         return $this->dbSession->destroySession($id);
     } else {
         parent::destroySession($id);
     }
 }
All Usage Examples Of yii\web\DbSession::destroySession