示例#1
0
 /**
  * {@inheritDoc}
  */
 public function read()
 {
     $identity = $this->storage->read();
     if ($identity) {
         try {
             return $this->repository->find($identity);
         } catch (DBALException $e) {
             // The user table does not exist.
             return null;
         }
     }
     return null;
 }
 /**
  * @return int
  */
 private function getSessionIdFromStorage()
 {
     /*
      * run dependency check
      */
     $this->checkDependencies();
     /*
      * if the container is empty return 0
      * else return the session id stored
      */
     if ($this->container->isEmpty()) {
         return 0;
     } else {
         return $this->container->read();
     }
 }
 public function getIdentity()
 {
     return $this->storage->read();
 }