read() public method

Read a value from the session.
public read ( null | string $key = null, array $options = [] ) : Closure
$key null | string Key of the entry to be read. If no key is passed, all current session data is returned.
$options array Options array. Not used for this adapter method.
return Closure Function returning data in the session if successful, `false` otherwise.
Beispiel #1
0
 public function testIsStartedNoInit()
 {
     $this->_destroySession(session_name());
     $Php = new Php(array('init' => false));
     $result = $Php->isStarted();
     $this->assertFalse($result);
     $Php = new Php();
     $Php->read();
     $result = $Php->isStarted();
     $this->assertTrue($result);
 }