]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/html/HttpRequest.class.php
Introduced isPost() function to keep things shorter
[timetracker.git] / WEB-INF / lib / html / HttpRequest.class.php
index 84081c713786363fa50108f0e5662731ddc09b80..cea6122619c391f01cc5a51f9db52d69ae6fbcf3 100644 (file)
@@ -31,7 +31,12 @@ class ttHttpRequest {
   function getMethod() {
     return isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : false;
   }
-       
+
+  // The isPost function determines if a request method is POST.
+  function isPost() {
+    return ($this->getMethod() == 'POST');
+  }
+
   // The getParameter is the primary function of this class. It returns request parameter,
   // identified by $name.
   function getParameter($name = "", $default = null) {