summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorMichiel Vugteveen <michiel@it-can.nl>2012-03-07 20:41:37 +0100
committerMichiel Vugteveen <michiel@it-can.nl>2012-03-07 20:41:37 +0100
commitdc900df67972ed1c961fc3e4173db98047bdbd1b (patch)
treef72d514a614979babef53d26352c03a4dfeaba65 /system/core/Input.php
parentbe0ca26c9006981eced5d938060ba5bad4145e3b (diff)
removed is_method
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-xsystem/core/Input.php24
1 files changed, 6 insertions, 18 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index e8e3b1d9c..65de8c824 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -704,28 +704,16 @@ class CI_Input {
/**
* Get Request Method
*
- * Return the Request Method in lowercase
+ * Return the Request Method
*
+ * @param bool uppercase or lowercase
* @return mixed
*/
- public function method()
+ public function method($upper = TRUE)
{
- return strtolower($this->server('REQUEST_METHOD'));
- }
-
- // --------------------------------------------------------------------
-
- /**
- * Validate parameter against $_SERVER['REQUEST_METHOD']
- *
- * Return TRUE if method equals $_SERVER['REQUEST_METHOD'], otherwise return FALSE
- *
- * @param string request method to match
- * @return bool
- */
- public function is_method($method = '')
- {
- return ($this->method() === strtolower($method));
+ return ($upper)
+ ? strtoupper($this->server('REQUEST_METHOD'))
+ : strtolower($this->server('REQUEST_METHOD'));
}
}