diff options
Diffstat (limited to 'system/core/Input.php')
-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 */ |