Пример #1
0
 function testDestroy()
 {
     $this->sessionManager->start();
     $repository = $this->sessionManager->getRepository();
     $sessionKey = 'hello';
     $sessionValue = 'world';
     $repository[$sessionKey] = $sessionValue;
     $this->assertEquals($sessionValue, $repository->get($sessionKey));
     $this->sessionManager->destroy();
     $this->assertEquals(null, $repository->get($sessionKey));
 }
Пример #2
0
 /**
  * SessionManager初始化工作
  * @param SessionManager $sessionManager
  */
 function initialize(SessionManager $sessionManager)
 {
     $this->duration = $sessionManager->getGcMaxLifeTime();
     parent::initialize($sessionManager);
 }