X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=WEB-INF%2Flib%2Fhtml%2FHttpRequest.class.php;h=cea6122619c391f01cc5a51f9db52d69ae6fbcf3;hb=abe3a7f279615f45b4bf0072a1b041ff651eeebc;hp=857194a15b3c7abc2130809531704b07fb590f2e;hpb=9a23a8c0a51b7ec38a96f525484134f3cb85dc7e;p=timetracker.git diff --git a/WEB-INF/lib/html/HttpRequest.class.php b/WEB-INF/lib/html/HttpRequest.class.php index 857194a1..cea61226 100644 --- a/WEB-INF/lib/html/HttpRequest.class.php +++ b/WEB-INF/lib/html/HttpRequest.class.php @@ -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) { @@ -48,4 +53,3 @@ class ttHttpRequest { return $default; } } -?> \ No newline at end of file