Imbo\EventListener\ImageVariations\Database\MongoDB::getCollection PHP Method

getCollection() private method

Get the mongo collection
private getCollection ( ) : MongoCollection
return MongoCollection
    private function getCollection()
    {
        if ($this->collection === null) {
            try {
                $this->collection = $this->getMongoClient()->selectCollection($this->params['databaseName'], 'imagevariation');
            } catch (MongoException $e) {
                throw new DatabaseException('Could not select collection', 500, $e);
            }
        }
        return $this->collection;
    }