code: public static function getMethod($strLower = false)
      {
          $method = isset($_SERVER['REQUEST_METHOD']) ? $_SERVER['REQUEST_METHOD'] : 'GET';
          if ($strLower) {
              $method = strtolower($method);
          } else {
              $method = strtoupper($method);
          }
          return $method;
      }
docs: Get method.
  @param boolean $strLower Default false.
  
  @return string