]> wagnertech.de Git - timetracker.git/blobdiff - WEB-INF/lib/html/HttpRequest.class.php
Some refactoring in translation files.
[timetracker.git] / WEB-INF / lib / html / HttpRequest.class.php
index 84081c713786363fa50108f0e5662731ddc09b80..cd66a8cc6440cc4b36a72a54147d702d8f7b5d4d 100644 (file)
@@ -31,7 +31,17 @@ class ttHttpRequest {
   function getMethod() {
     return isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : false;
   }
   function getMethod() {
     return isset( $_SERVER['REQUEST_METHOD'] ) ? $_SERVER['REQUEST_METHOD'] : false;
   }
-       
+
+  // The isGet function determines if a request method is a GET.
+  function isGet() {
+    return ($this->getMethod() == 'GET');
+  }
+
+  // The isPost function determines if a request method is a 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) { 
   // The getParameter is the primary function of this class. It returns request parameter,
   // identified by $name.
   function getParameter($name = "", $default = null) {