lithium\core\Adaptable::_config()

protected static method

Gets an array of settings for the given named configuration in the current environment. Each configuration will at least contain an 'adapter' option.

Parameters

  • string $name

    Named configuration.

Returns

array|null

Settings for the named configuration.

Source

	protected static function _config($name) {
		if (!isset(static::$_configurations[$name])) {
			return null;
		}
		$settings = static::$_configurations[$name];

		if (isset($settings[0])) {
			return $settings[0];
		}
		$env = Environment::get();
		$config = isset($settings[$env]) ? $settings[$env] : $settings;

		if (isset($settings[$env]) && isset($settings[true])) {
			$config += $settings[true];
		}
		static::$_configurations[$name] += [static::_initConfig($name, $config)];
		return static::$_configurations[$name][0];
	}