public function protocol($raw = false)
    {
        if ($raw) {
            return $this->server('SERVER_PROTOCOL');
        }

        $parts = explode('/', $this->server('SERVER_PROTOCOL'));

        return strtolower(array_shift($parts)) . $this->server('HTTPS') === 'on' ? 's' : '';
    }
public function protocol($raw = false)
    {
        if ($raw) {
            return $this->server('SERVER_PROTOCOL');
        }

        $parts = explode('/', $this->server('SERVER_PROTOCOL'));

        return strtolower(array_shift($parts)) . $this->server('HTTPS') === 'on' ? 's' : '';
    }
public function protocol ( $ raw = false ) { if ( $ raw ) { return $ this -> server ( 'SERVER_PROTOCOL' ) ; } $ parts = explode ( '/' , $ this -> server ( 'SERVER_PROTOCOL' ) ) ; return strtolower ( array_shift ( $ parts ) ) . $ this -> server ( 'HTTPS' ) === 'on' ? 's' : '' ; }
Retrieve the requests protocol

@param bool $raw Also return protocol version if available

@return string
Retrieve the requests protocol