LMongo\DatabaseManager::getConfig PHP Method

getConfig() protected method

Get the configuration for a connection.
protected getConfig ( string $name ) : array
$name string
return array
    protected function getConfig($name)
    {
        $name = $name ?: $this->getDefaultConnection();
        // To get the database connection configuration, we will just pull each of the
        // connection configurations and get the configurations for the given name.
        // If the configuration doesn't exist, we'll throw an exception and bail.
        $connections = $this->app['config']['lmongo::connections'];
        if (is_null($config = array_get($connections, $name))) {
            throw new \InvalidArgumentException("MongoDB [{$name}] not configured.");
        }
        return array_add($config, 'name', $name);
    }