src/Config.php
public function get($key, $default = null)
    {
        if (empty($key)) {
            return $default;
        }

        $parts = explode(".", $key);
        $file = array_shift($parts);

        if (!isset($this->registry[$file])) {
            $this->registry[$file] = $this->discover($file);
        }
        $res = $this->parse($key);

        return is_null($res) ? $default : $res;
    }
public function get($key, $default = null)
    {
        if (empty($key)) {
            return $default;
        }

        $parts = explode(".", $key);
        $file = array_shift($parts);

        if (!isset($this->registry[$file])) {
            $this->registry[$file] = $this->discover($file);
        }
        $res = $this->parse($key);

        return is_null($res) ? $default : $res;
    }
public function get ( $ key , $ default = null ) { if ( empty ( $ key ) ) { return $ default ; } $ parts = explode ( "." , $ key ) ; $ file = array_shift ( $ parts ) ; if ( ! isset ( $ this -> registry [ $ file ] ) ) { $ this -> registry [ $ file ] = $ this -> discover ( $ file ) ; } $ res = $ this -> parse ( $ key ) ; return is_null ( $ res ) ? $ default : $ res ; }
Returns loaded config option. If the key is not found it checks if registered loaders can
find the key.

@param string $key
@param mixed $default - the value to be returned if the $key is not found

@return mixed
Returns loaded config option . If the key is not found it checks if registered loaders can find the key .