src/Configuration/Configuration.php
public function get(string $key, $default = null)
    {
        if (null === $this->config) {
            $this->config = $this->configurationParser
                ->parseConfig();
        }

        if (\array_key_exists($key, $this->config)) {
            return $this->config[$key];
        }

        $parts = \explode('.', $key);

        $value = $this->config;
        foreach ($parts as $part) {
            if (!\is_array($value) || !\array_key_exists($part, $value)) {
                return $default;
            }

            $value = $value[$part];
        }

        return $value;
    }
public function get(string $key, $default = null)
    {
        if (null === $this->config) {
            $this->config = $this->configurationParser
                ->parseConfig();
        }

        if (\array_key_exists($key, $this->config)) {
            return $this->config[$key];
        }

        $parts = \explode('.', $key);

        $value = $this->config;
        foreach ($parts as $part) {
            if (!\is_array($value) || !\array_key_exists($part, $value)) {
                return $default;
            }

            $value = $value[$part];
        }

        return $value;
    }
public function get ( string $ key , $ default = null ) { if ( null === $ this -> config ) { $ this -> config = $ this -> configurationParser -> parseConfig ( ) ; } if ( \ array_key_exists ( $ key , $ this -> config ) ) { return $ this -> config [ $ key ] ; } $ parts = \ explode ( '.' , $ key ) ; $ value = $ this -> config ; foreach ( $ parts as $ part ) { if ( ! \ is_array ( $ value ) || ! \ array_key_exists ( $ part , $ value ) ) { return $ default ; } $ value = $ value [ $ part ] ; } return $ value ; }
Return a parameter based on a key.

@param string $key
@param mixed  $default

@return mixed
Return a parameter based on a key .