summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-03-09 18:03:55 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-03-09 18:03:55 +0100
commit8e2ca4eb4e669e1ae7223f58c4596454e241f207 (patch)
tree21253402e41d00183541b6561e193b256276393d /system/core/Input.php
parent07c1ac830b4e98aa40f48baef3dd05fb68c0a836 (diff)
parentc016a1102e2a77e0c27b9656c19a0460df24dfb6 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-xsystem/core/Input.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 9a05034ba..54b7e0923 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -699,6 +699,23 @@ class CI_Input {
return (php_sapi_name() === 'cli' OR defined('STDIN'));
}
+ // --------------------------------------------------------------------
+
+ /**
+ * Get Request Method
+ *
+ * Return the Request Method
+ *
+ * @param bool uppercase or lowercase
+ * @return bool
+ */
+ public function method($upper = FALSE)
+ {
+ return ($upper)
+ ? strtoupper($this->server('REQUEST_METHOD'))
+ : strtolower($this->server('REQUEST_METHOD'));
+ }
+
}
/* End of file Input.php */