ManaPHP\Http\Request::getScheme PHP Метод

getScheme() публичный Метод

Gets HTTP schema (http/https)
public getScheme ( ) : string
Результат string
    public function getScheme()
    {
        if (isset($_SERVER['REQUEST_SCHEME'])) {
            return $_SERVER['REQUEST_SCHEME'];
        } elseif (isset($_SERVER['HTTPS'])) {
            if ($_SERVER['HTTPS'] === 'on') {
                return 'https';
            } else {
                return 'http';
            }
        } else {
            throw new RequestException('`HTTPS` field not exists in $_SERVER');
        }
    }