X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/9a23a8c0a51b7ec38a96f525484134f3cb85dc7e..a8ef8ed3ff0aca2d4429b08cc7ff37bd273f4547:/WEB-INF/lib/html/HttpRequest.class.php diff --git a/WEB-INF/lib/html/HttpRequest.class.php b/WEB-INF/lib/html/HttpRequest.class.php index 857194a1..cd66a8cc 100644 --- a/WEB-INF/lib/html/HttpRequest.class.php +++ b/WEB-INF/lib/html/HttpRequest.class.php @@ -31,7 +31,17 @@ class ttHttpRequest { 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) { @@ -48,4 +58,3 @@ class ttHttpRequest { return $default; } } -?> \ No newline at end of file