Get the configuration for a connection.

@param  string $name
@return array

@throws \InvalidArgumentException
542559
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 = Framework::config()->get( 'database.connections' );

		if ( is_null( $config = Arr::get( $connections, $name ) ) )
			throw new InvalidArgumentException( "Database [$name] not configured." );

		return $config;
	}
677806
public function getConnection($name)
	{
		if (array_key_exists($name, $this->_connections))
			return $this->_connections[$name];

		return null;
	}
736059
public function getAdmingeneratorConfig($name)
    {
        $search_in = $this->bundleConfig;
        $path = explode('.', $name);
        foreach ($path as $key) {
            if (!array_key_exists($key, $search_in)) {
                throw new \InvalidArgumentException('Unknown parameter "admingenerator.' . $name . '".');
            }
            $search_in = $search_in[$key];
        }

        return $search_in;
    }
567776
public function getForConnection($name = null)
    {
        $connection = $this->registry->getConnection($name);

        return $this->factory->make($connection, $name);
    }
348976
public static function get($name)
    {
        if (!isset(self::$connections[$name])) {
            throw new Exception(sprintf('Connection "%s" does not exist.', $name));
        }

        return self::$connections[$name];
    }
391575
public static function connection($name = null)
    {
        if (is_null($name) || strlen($name) == 0) {
            if (is_null(static::$name)) {
                static::$name = static::$config['default'];
            }

            $name = static::$name;
        }

        if (!isset(static::$config['connection'][$name])) {
            throw new ConnectionException('The connection "' . $name . '" is not defined.');
        }

        if ($name !== static::$name) {
            static::$adapter = null;
        }

        $config = static::$config['connection'][$name];

        static::$name = $name;

        if (static::$adapter === null) {
            if ($name == 'mysql') {
                static::$adapter = new MysqlAdapter($config);
            } elseif ($name == 'sqlite') {
                static::$adapter = new SqliteAdapter($config);
            } else {
                throw new ConnectionException('This driver is not praised');
            }

            static::$adapter->setFetchMode(static::$config['fetch']);
        }

        if (static::$adapter->getConnection() instanceof PDO && $name == static::$name) {
            return static::getInstance();
        }

        return static::getInstance();
    }
1120833
protected function getConfigure(string $name): ?array
    {
        if (isset($this->config[$name])) {
            return $this->config[$name];
        }

        if (!isset($this->abstractAlias[$name])) {
            return null;
        }

        foreach ($this->abstractAlias[$name] as $alias) {
            if (isset($this->config[$alias])) {
                return $this->config[$alias];
            }
        }

        return null;
    }
954215
protected function configuration($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 = config('database.connections');
        if (is_null($config = Nip_Helper_Arrays::get($connections, $name))) {
            throw new InvalidArgumentException("Database [$name] not configured.");
        }
        return $config;
    }
443122
protected function configuration($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->prop['database.connections'];
		if (is_null($config = Arr::get($connections, $name)))
		{
			throw new InvalidArgumentException("Database [$name] not configured.");
		}

		return $config;
	}
1229918
public function getConnectionConfig($name = null) {
		if (is_null($name)) {
			$name = $this->defaultConfigName;
		}

		if (isset($this->connectionConfigs[$name])) {
			return $this->connectionConfigs[$name];
		}

		return null;
	}
1274845
protected function makeConnection($name)
    {
        $config = $this->getConnectionConfig($name);

        if (isset($this->extensions[$name])) {
            return call_user_func($this->extensions[$name], $config, $name);
        }

        if (!isset($config['driver'])) {
            throw new InvalidArgumentException(
                sprintf('The pub-sub connection [%s] is missing a "driver" config var.', $name)
            );
        }

        return $this->factory->make($config['driver'], array_except($config, ['driver']));
    }
1127240
protected function resolve($name)
    {
        $options = Arr::get($this->config, 'options', []);

        if (isset($this->config[$name])) {
            return $this->connector()->connect($this->config[$name], $options);
        }

        if (isset($this->config['clusters'][$name])) {
            return $this->resolveCluster($name);
        }

        throw new \InvalidArgumentException(
            "Redis connection [{$name}] not configured."
        );
    }
1079282
public function resolve($name = null)
    {
        $name = $name ?: 'default';

        $options = $this->config['options'] ?? [];

        if (isset($this->config[$name])) {
            return $this->connector()->connect($this->config[$name], $options);
        }

        if (isset($this->config['clusters'][$name])) {
            return $this->resolveCluster($name);
        }

        throw new InvalidArgumentException("Redis connection [{$name}] not configured.");
    }
220507
public function get($name)
    {
        $loader = $this->getLoader();
        $configurationKey = $loader->getConfigurationKey($name);
        $configuration = &static::$configurations[$configurationKey];
        if (!isset($configuration)) {
            $configuration = $loader->loadByKey($configurationKey);
        }

        return $configuration;
    }
338226
protected function getConfig($name)
    {
        $config = $this->app['config']['picture'];
        $driverConfig = isset($config['disks'][$name]) ? $config['disks'][$name] : [];
        if (!isset($driverConfig['sizeList'])) {
            $driverConfig['sizeList'] = $config['sizeList'];
        }
        if (!isset($driverConfig['quality'])) {
            $driverConfig['quality'] = $config['quality'];
        }
        return $driverConfig;
    }
1340216
public function getConnection($name)
    {
        if (!$this->connectionSettings->has($name)) {
            throw new BadArgumentException('Connection with name ":name" not defined in configuration file ":file"', [
                'name' => $name, 'file' => ServiceLocator::instance()->getConfiguration()->getIdentity(),
            ]);
        }
        
        if (!static::$connections->has($name)) {
            static::$connections->set($name, new Connection($this->connectionSettings->get($name)));
        }
        
        return static::$connections[$name];
    }
987988
public static function getConnection($name=null)
	{
		$config = Config::instance();
		$name = $name ? $name : $config->getDefaultConnection();

		if (!isset(self::$connections[$name]) || !self::$connections[$name]->connection)
			self::$connections[$name] = Connection::instance($config->getConnection($name));

		return self::$connections[$name];
	}