lithium\core\Adaptable::config()

public static method

Sets configurations for a particular adaptable implementation, or returns the current configuration settings.

Parameters

  • array|string $config

    An array of configurations, indexed by name to set configurations in one go or a name for which to return the configuration.

Returns

array|void

Configuration or void if setting configurations.

Source

	public static function config($config = null) {
		if ($config && is_array($config)) {
			static::$_configurations = $config;
			return;
		}
		if ($config) {
			return static::_config($config);
		}
		$result = [];
		static::$_configurations = array_filter(static::$_configurations);

		foreach (array_keys(static::$_configurations) as $key) {
			$result[$key] = static::_config($key);
		}
		return $result;
	}