コード例 #1
0
 /**
  *
  * {@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();
 }
コード例 #2
0
ファイル: DoctrineWrapper.php プロジェクト: patrova/omeka-s
 /**
  * {@inheritDoc}
  */
 public function clear()
 {
     $this->storage->clear();
 }