]> git.mxchange.org Git - core.git/blobdiff - inc/classes/main/request/html/class_HtmlRequest.php
Opps, forgot this.
[core.git] / inc / classes / main / request / html / class_HtmlRequest.php
index 63ccd8267047627581c301b1dc5039be3c423ccf..edf9c9a412c00e9268f8bc151dcf1631a110858f 100644 (file)
@@ -49,6 +49,36 @@ class HtmlRequest extends BaseRequest implements Requestable {
                return $requestInstance;
        }
 
+       /**
+        * Checks if the request method is GET.
+        *
+        * @return      $isGet  Whether the request method is GET
+        */
+       public function isGetRequestMethod () {
+               // Check it
+               return ($this->getRequestMethod() == 'GET');
+       }
+
+       /**
+        * Checks if the request method is HEAD.
+        *
+        * @return      $isHead         Whether the request method is HEAD
+        */
+       public function isHeadRequestMethod () {
+               // Check it
+               return ($this->getRequestMethod() == 'HEAD');
+       }
+
+       /**
+        * Checks if the request method is POST.
+        *
+        * @return      $isPost         Whether the request method is POST
+        */
+       public function isPostRequestMethod () {
+               // Check it
+               return ($this->getRequestMethod() == 'POST');
+       }
+
        /**
         * Prepares the HTML request data for usage by currently copying
         * $_REQUEST into a private attribute. Later on we can add more
@@ -72,7 +102,7 @@ class HtmlRequest extends BaseRequest implements Requestable {
                $headerValue = NULL;
 
                // Construct the name
-               $name = 'HTTP_' . strtoupper($this->convertDashesToUnderscores($headerName));
+               $name = 'HTTP_' . strtoupper(self::convertDashesToUnderscores($headerName));
 
                // Does this header exist?
                if (isset($_SERVER[$name])) {