Habari\Config::get PHP Метод

get() публичный статический Метод

Fetch data from registry
public static get ( string $key, null $default = null ) : mixed
$key string key name
$default null
Результат mixed (empty object on invalid key)
    public static function get($key, $default = null)
    {
        $result = null;
        // If asking for the db_connection, but it's not stored that way...
        if ($key == 'db_connection' && !isset(self::$registry['db_connection']) && self::exists('connection_string')) {
            $result = array('connection_string' => self::get('connection_string'), 'username' => self::get('username', ''), 'password' => self::get('password', ''), 'prefix' => self::get('prefix', ''));
            $result = (object) $result;
        } elseif (!self::exists($key)) {
            $result = $default;
        } else {
            $result = isset(self::$registry[$key]) ? self::$registry[$key] : $_SERVER[self::$prefix . $key];
        }
        return $result;
    }