/** * * {@inheritDoc} * @see \Zend\Authentication\Storage\StorageInterface::clear() */ public function clear() { /* * run dependency check */ $this->checkDependencies(); /* * only do anything if the session is not empty or expired * already * * */ if (!$this->isExpiredOrEmpty()) { $now = new DateTime(); $em = $this->entityManager; $sessionId = $this->getSessionIdFromStorage(); $session = $this->getSessionEntityById($sessionId); /* * expire the session now */ $session->setRemoved($now); $em->flush(); } /* * reset the container/php session variable */ $this->container->clear(); }
/** * {@inheritDoc} */ public function clear() { $this->storage->clear(); }