public function get($key, $default = null)
    {
        if (\array_key_exists($key, $this->cacheEnv)) {
            return $this->cacheEnv[$key];
        }

        $envKey = $this->convertEnvKey($key);
        $envValue = getenv($envKey);

        if (false !== $envValue) {
            return $this->cacheEnv[$key] = $this->convertEnvValue($envValue, $envKey);
        }

        $defaultValue = $this->getDefaultValue($key, $default);

        return \array_key_exists($key, $this->config)
            ? $this->getByManager($key, $this->config[$key], $defaultValue)
            : $defaultValue;
    }
public function get($key, $default = null)
    {
        if (\array_key_exists($key, $this->cacheEnv)) {
            return $this->cacheEnv[$key];
        }

        $envKey = $this->convertEnvKey($key);
        $envValue = getenv($envKey);

        if (false !== $envValue) {
            return $this->cacheEnv[$key] = $this->convertEnvValue($envValue, $envKey);
        }

        $defaultValue = $this->getDefaultValue($key, $default);

        return \array_key_exists($key, $this->config)
            ? $this->getByManager($key, $this->config[$key], $defaultValue)
            : $defaultValue;
    }
public function get ( $ key , $ default = null ) { if ( \ array_key_exists ( $ key , $ this -> cacheEnv ) ) { return $ this -> cacheEnv [ $ key ] ; } $ envKey = $ this -> convertEnvKey ( $ key ) ; $ envValue = getenv ( $ envKey ) ; if ( false !== $ envValue ) { return $ this -> cacheEnv [ $ key ] = $ this -> convertEnvValue ( $ envValue , $ envKey ) ; } $ defaultValue = $ this -> getDefaultValue ( $ key , $ default ) ; return \ array_key_exists ( $ key , $ this -> config ) ? $ this -> getByManager ( $ key , $ this -> config [ $ key ] , $ defaultValue ) : $ defaultValue ; }
Get the config value.

@param string     $key     The config key
@param null|mixed $default The default value

@return null|mixed
Get the config value .