Added isGetRequestMethod(), isHeadRequestMethod() and isPostRequestMethod().
[core.git] / inc / classes / main / request / console / class_ConsoleRequest.php
index eba7b74d48792161d65c3f59d579a4d9d9c3b39e..c5e070ed01adef8b202987309fdebd02fece899f 100644 (file)
@@ -118,6 +118,39 @@ class ConsoleRequest extends BaseRequest implements Requestable {
                // There are no cookies on console
                throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
        }
+
+       /**
+        * Checks if the request method is GET.
+        *
+        * @return      $isGet  Whether the request method is GET
+        * @throws      UnsupportedOperationException   This method should never be called
+        */
+       public function isGetRequestMethod () {
+               // Not support method
+               throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
+
+       /**
+        * Checks if the request method is HEAD.
+        *
+        * @return      $isHead         Whether the request method is HEAD
+        * @throws      UnsupportedOperationException   This method should never be called
+        */
+       public function isHeadRequestMethod () {
+               // Not support method
+               throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
+
+       /**
+        * Checks if the request method is POST.
+        *
+        * @return      $isPost         Whether the request method is POST
+        * @throws      UnsupportedOperationException   This method should never be called
+        */
+       public function isPostRequestMethod () {
+               // Not support method
+               throw new UnsupportedOperationException(array($this, __FUNCTION__, $executorInstance), self::EXCEPTION_UNSPPORTED_OPERATION);
+       }
 }
 
 // [EOF]