public function get($keys, $type = self::CONFIG_ALL, $default = null)
    {
        $this->guardConfigSlot($type);

        $keys = (array) $keys;

        if (count($keys) === 1) {
            return array_key_exists($keys[0], $this->config[$type]) ? $this->config[$type][$keys[0]] : $default;
        }

        $current = $this->config[$type];

        foreach ($keys as $key) {
            if (!is_array($current) || !array_key_exists($key, $current)) {
                return $default;
            }

            $current = $current[$key];
        }

        return $current;
    }
public function get($keys, $type = self::CONFIG_ALL, $default = null)
    {
        $this->guardConfigSlot($type);

        $keys = (array) $keys;

        if (count($keys) === 1) {
            return array_key_exists($keys[0], $this->config[$type]) ? $this->config[$type][$keys[0]] : $default;
        }

        $current = $this->config[$type];

        foreach ($keys as $key) {
            if (!is_array($current) || !array_key_exists($key, $current)) {
                return $default;
            }

            $current = $current[$key];
        }

        return $current;
    }
public function get ( $ keys , $ type = self :: CONFIG_ALL , $ default = null ) { $ this -> guardConfigSlot ( $ type ) ; $ keys = ( array ) $ keys ; if ( count ( $ keys ) === 1 ) { return array_key_exists ( $ keys [ 0 ] , $ this -> config [ $ type ] ) ? $ this -> config [ $ type ] [ $ keys [ 0 ] ] : $ default ; } $ current = $ this -> config [ $ type ] ; foreach ( $ keys as $ key ) { if ( ! is_array ( $ current ) || ! array_key_exists ( $ key , $ current ) ) { return $ default ; } $ current = $ current [ $ key ] ; } return $ current ; }
Returns a config value.

@param string|string[]             $keys    Single level key like 'adapters' or array-path
like ['adapters', 'github']
@param string                      $type    Either Config::CONFIG_SYSTEM Config::CONFIG_LOCAL
or Config::CONFIG_ALL
@param string|int|float|bool|array $default Default value to use when no config is found (null)

@return string|int|float|bool|array
Returns a config value .