public function load($source, array $options = []): Config
    {
        if (!isset($options['map'])) {
            throw new BadMethodCallException("No 'map' option specified");
        }

        $config = new Config();
        $dotkey = DotKey::on($config);

        foreach ($options['map'] as $env => $key) {
            $value = $this->getenv($env);

            if (isset($value)) {
                $dotkey->put($key, $value);
            }
        }

        return $config;
    }
public function load($source, array $options = []): Config
    {
        if (!isset($options['map'])) {
            throw new BadMethodCallException("No 'map' option specified");
        }

        $config = new Config();
        $dotkey = DotKey::on($config);

        foreach ($options['map'] as $env => $key) {
            $value = $this->getenv($env);

            if (isset($value)) {
                $dotkey->put($key, $value);
            }
        }

        return $config;
    }
public function load ( $ source , array $ options = [ ] ) : Config { if ( ! isset ( $ options [ 'map' ] ) ) { throw new BadMethodCallException ( "No 'map' option specified" ) ; } $ config = new Config ( ) ; $ dotkey = DotKey :: on ( $ config ) ; foreach ( $ options [ 'map' ] as $ env => $ key ) { $ value = $ this -> getenv ( $ env ) ; if ( isset ( $ value ) ) { $ dotkey -> put ( $ key , $ value ) ; } } return $ config ; }
Load settings from environment

@param mixed $source  Ignored
@param array $options
@return Config
Load settings from environment