summaryrefslogtreecommitdiffstats
path: root/system/core/Input.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-10 14:44:57 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-10 14:44:57 +0100
commitc857bc23d35840a9c3b13ce752ae832385639f73 (patch)
treea864a7600d37ca110c3e44c06cc1b55170ad272c /system/core/Input.php
parent172331d40c991741c76fcf70f4262c2db821c6f8 (diff)
parent52a31ba3acc5f5be16692ac25c70780775e548e0 (diff)
Merge branch 'develop' of github.com:EllisLab/CodeIgniter into develop-dh-date-range
Diffstat (limited to 'system/core/Input.php')
-rwxr-xr-xsystem/core/Input.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index ee15f4013..54b7e0923 100755
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -2,7 +2,7 @@
/**
* CodeIgniter
*
- * An open source application development framework for PHP 5.1.6 or newer
+ * An open source application development framework for PHP 5.2.4 or newer
*
* NOTICE OF LICENSE
*
@@ -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 */