Beispiel #1
0
 /**
  * Garbage collect stale sessions from the SessionHandler backend.
  *
  * @param   integer $lifetime The maximum age of a session.
  *
  * @throws  \Exception
  * @return  boolean  True on success, false otherwise.
  *
  * @since   2.0
  */
 public function gc($lifetime = 1440)
 {
     // Determine the timestamp threshold with which to purge old sessions.
     $past = time() - $lifetime;
     try {
         return $this->db->gc($past);
     } catch (\Exception $e) {
         throw $e;
     }
 }
 /**
  * Class init.
  *
  * @param AbstractDatabaseDriver $db
  * @param array          $options
  */
 public function __construct(AbstractDatabaseDriver $db, $options = array())
 {
     parent::__construct($db, $options);
 }