You are here

private function MongoDbSessionHandler::getCollection 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::getCollection()

Return a "MongoCollection" instance.

Return value

\MongoCollection

File

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

Class

MongoDbSessionHandler
MongoDB session handler.

Namespace

Symfony\Component\HttpFoundation\Session\Storage\Handler

Code

private function getCollection() {
  if (null === $this->collection) {
    $this->collection = $this->mongo
      ->selectCollection($this->options['database'], $this->options['collection']);
  }
  return $this->collection;
}