public function protocol($version = false) : string {
      if ($version === false) {
        $protocol = 'http';
        if ($this->server()->get('HTTPS')) {
          $protocol = 'https';
        }
        
        return $protocol;
      }
      
      return $this->server()->get('SERVER_PROTOCOL');
    }
public function protocol($version = false) : string {
      if ($version === false) {
        $protocol = 'http';
        if ($this->server()->get('HTTPS')) {
          $protocol = 'https';
        }
        
        return $protocol;
      }
      
      return $this->server()->get('SERVER_PROTOCOL');
    }
public function protocol ( $ version = false ) : string { if ( $ version === false ) { $ protocol = 'http' ; if ( $ this -> server ( ) -> get ( 'HTTPS' ) ) { $ protocol = 'https' ; } return $ protocol ; } return $ this -> server ( ) -> get ( 'SERVER_PROTOCOL' ) ; }
Get used server protocal

@param bool $version
@return string
Get used server protocal