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
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);
     }
 }
Example #2
0
 public function testReadWrite()
 {
     $session = new DbSession();
     $session->writeSession('test', 'session data');
     $this->assertEquals('session data', $session->readSession('test'));
     $session->destroySession('test');
     $this->assertEquals('', $session->readSession('test'));
 }