src/config/Config.php
public function get($key, $default = null) {
        if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key));
        // TODO: a numerically indexed property array will have integer keys

        $notFound = false;
        $value = $this->getProperty($key, $notFound);

        if ($notFound) {
            if (func_num_args() == 1) throw new RuntimeException('No configuration found for key "'.$key.'"');
            return $default;
        }
        return $value;
    }
public function get($key, $default = null) {
        if (!is_string($key)) throw new IllegalTypeException('Illegal type of parameter $key: '.gettype($key));
        // TODO: a numerically indexed property array will have integer keys

        $notFound = false;
        $value = $this->getProperty($key, $notFound);

        if ($notFound) {
            if (func_num_args() == 1) throw new RuntimeException('No configuration found for key "'.$key.'"');
            return $default;
        }
        return $value;
    }
public function get ( $ key , $ default = null ) { if ( ! is_string ( $ key ) ) throw new IllegalTypeException ( 'Illegal type of parameter $key: ' . gettype ( $ key ) ) ; // TODO: a numerically indexed property array will have integer keys $ notFound = false ; $ value = $ this -> getProperty ( $ key , $ notFound ) ; if ( $ notFound ) { if ( func_num_args ( ) == 1 ) throw new RuntimeException ( 'No configuration found for key "' . $ key . '"' ) ; return $ default ; } return $ value ; }
Return the config setting with the specified key or the default value if no such setting is found.

@param  string $key                - case-insensitive key
@param  mixed  $default [optional] - default value

@return mixed - config setting
Return the config setting with the specified key or the default value if no such setting is found .