aboutsummaryrefslogtreecommitdiff
path: root/lib/Minz/Request.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Minz/Request.php')
-rw-r--r--lib/Minz/Request.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Minz/Request.php b/lib/Minz/Request.php
index 912c354ac..9235f873a 100644
--- a/lib/Minz/Request.php
+++ b/lib/Minz/Request.php
@@ -52,6 +52,12 @@ class Minz_Request {
}
return null;
}
+ public static function paramBoolean($key) {
+ if (null === $value = self::paramTernary($key)) {
+ return false;
+ }
+ return $value;
+ }
public static function defaultControllerName() {
return self::$default_controller_name;
}
@@ -98,6 +104,13 @@ class Minz_Request {
self::initJSON();
}
+ public static function is($controller_name, $action_name) {
+ return (
+ self::$controller_name === $controller_name &&
+ self::$action_name === $action_name
+ );
+ }
+
/**
* Return true if the request is over HTTPS, false otherwise (HTTP)
*/