Esempio n. 1
0
 /**
  * Load session object from an existing array
  *
  * Ensures $_SESSION is set to an instance of the object when complete.
  *
  * @param  array          $array
  * @return SessionStorage
  */
 public function fromArray(array $array)
 {
     parent::fromArray($array);
     if ($_SESSION !== $this) {
         $_SESSION = $this;
     }
     return $this;
 }
Esempio n. 2
0
 public function testRequestAccessTimeIsPreservedEvenInFactoryMethod()
 {
     $this->assertNotEmpty($this->storage->getRequestAccessTime());
     $this->storage->fromArray(array());
     $this->assertNotEmpty($this->storage->getRequestAccessTime());
 }