/** * {@inheritDoc} */ public function isEmpty() { if ($this->storage->isEmpty()) { return true; } if (null === $this->read()) { // An identity may exist in a cookie but not in the database. return true; } return false; }
/** * @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(); } }
/** * * @return boolean */ public function hasIdentity() { return !$this->storage->isEmpty(); }