summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-07 20:53:30 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-07 20:53:30 +0100
commit8e0ea9f64fa452c9ec04fc3f16bc571274ee1552 (patch)
treee5ab6e563f68edd3979e75f8bf9de48537108a9d /system/core/Input.php
parent1d571971be8be78a92d31aad27dda4009770043f (diff)
parent1e9fb49a9eb5cebbe2e3cdf106892d9af72cfdc5 (diff)
Merge pull request #1142 from IT-Can/input-method
Added method() #783
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 ee15f4013..5a4659a5a 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 */