diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-03-07 20:53:30 +0100 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-03-07 20:53:30 +0100 |
commit | 8e0ea9f64fa452c9ec04fc3f16bc571274ee1552 (patch) | |
tree | e5ab6e563f68edd3979e75f8bf9de48537108a9d /system | |
parent | 1d571971be8be78a92d31aad27dda4009770043f (diff) | |
parent | 1e9fb49a9eb5cebbe2e3cdf106892d9af72cfdc5 (diff) |
Merge pull request #1142 from IT-Can/input-method
Added method() #783
Diffstat (limited to 'system')
-rwxr-xr-x | system/core/Input.php | 17 |
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 */ |