Returns configuration for given name.

Parameters

  • string $name Registered library to retrieve configuration for.
  • string $key Optional key name. If `$name` is set and is the name of a valid library, returns the given named configuration key, i.e. `'path'`, `'webroot'` or `'resources'`.

Returns

mixed A configuation array for one or more libraries, or a string value if `$key` is specified.

Source

						public static function get($name = null, $key = null) {
		$configs = static::$_configurations;

		if (!$name) {
			return $configs;
		}
		if ($name === true) {
			$name = static::$_default;
		}
		if (is_array($name)) {
			foreach ($name as $i => $key) {
				unset($name[$i]);
				$name[$key] = isset($configs[$key]) ? $configs[$key] : null;
			}
			return $name;
		}
		$config = isset($configs[$name]) ? $configs[$name] : null;

		if (!$key) {
			return $config;
		}
		return isset($config[$key]) ? $config[$key] : null;
	}