lithium\core\Configuration::get PHP Method

get() public method

Gets an array of settings for the given named configuration in the current environment.
See also: lithium\core\Environment
public get ( string $name = null ) : array
$name string Name of the configuration.
return array Settings of the named configuration.
    public function get($name = null)
    {
        if ($name === null) {
            $result = array();
            $this->_configurations = array_filter($this->_configurations);
            foreach ($this->_configurations as $key => $value) {
                $result[$key] = $this->get($key);
            }
            return $result;
        }
        $settings =& $this->_configurations;
        if (!isset($settings[$name])) {
            return null;
        }
        if (isset($settings[$name][0])) {
            return $settings[$name][0];
        }
        $env = Environment::get();
        $config = isset($settings[$name][$env]) ? $settings[$name][$env] : $settings[$name];
        $method = is_callable($this->initConfig) ? $this->initConfig : null;
        $settings[$name][0] = $method ? $method($name, $config) : $config;
        return $settings[$name][0];
    }
Configuration