Imbo\Database\Mongo::getMongoClient PHP Method

getMongoClient() private method

Get the mongo client instance
private getMongoClient ( ) : MongoDB\Client
return MongoDB\Client
    private function getMongoClient()
    {
        if ($this->mongoClient === null) {
            try {
                $this->mongoClient = new MongoClient($this->params['server'], $this->params['options']);
            } catch (MongoException $e) {
                throw new DatabaseException('Could not connect to database', 500, $e);
            }
        }
        return $this->mongoClient;
    }