You are here

public function MongoDbSessionHandler::gc in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php \Symfony\Component\HttpFoundation\Session\Storage\Handler\MongoDbSessionHandler::gc()

File

vendor/symfony/http-foundation/Session/Storage/Handler/MongoDbSessionHandler.php, line 121

Class

MongoDbSessionHandler
MongoDB session handler.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

public function gc($maxlifetime) {
  $this
    ->getCollection()
    ->remove(array(
    $this->options['expiry_field'] => array(
      '$lt' => new \MongoDate(),
    ),
  ));
  return true;
}