code: public static function getScheme()
      {
          $protocol = isset($_SERVER['REQUEST_SCHEME']) ? strtolower($_SERVER['REQUEST_SCHEME']) : 'http';
          if ($protocol == 'http' && self::isSsl()) {
              $protocol .= 's';
          }
          return $protocol;
      }
docs: Get scheme.
  
  @return string