summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
authorMichiel Vugteveen <michiel@it-can.nl>2012-03-07 20:41:37 +0100
committerMichiel Vugteveen <michiel@it-can.nl>2012-03-07 20:41:37 +0100
commitdc900df67972ed1c961fc3e4173db98047bdbd1b (patch)
treef72d514a614979babef53d26352c03a4dfeaba65 /user_guide_src/source
parentbe0ca26c9006981eced5d938060ba5bad4145e3b (diff)
removed is_method
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst3
-rw-r--r--user_guide_src/source/libraries/input.rst23
2 files changed, 5 insertions, 21 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index f8c4ba144..58a4cb76b 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -97,8 +97,7 @@ Release Date: Not Released
- Added method get_vars() to CI_Loader to retrieve all variables loaded with $this->load->vars().
- is_loaded() function from system/core/Commons.php now returns a reference.
- $config['rewrite_short_tags'] now has no effect when using PHP 5.4 as *<?=* will always be available.
- - Added method() to CI_Input to retrieve $_SERVER['REQUEST_METHOD'] in lowercase.
- - Added is_method() to CI_Input to validate custom request method against $_SERVER['REQUEST_METHOD'].
+ - Added method() to CI_Input to retrieve $_SERVER['REQUEST_METHOD'].
Bug fixes for 3.0
------------------
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index 96d1f07e1..c63c627db 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -301,25 +301,10 @@ see if PHP is being run on the command line.
$this->input->method();
=====================================
-Returns the $_SERVER['REQUEST_METHOD'] in lowercase.
+Returns the $_SERVER['REQUEST_METHOD'], optional set uppercase or lowercase (standard lowercase).
::
- $this->input->method();
-
-$this->input->is_method($method);
-=====================================
-
-Returns TRUE if given method equals $_SERVER['REQUEST_METHOD'], otherwise returns FALSE.
-
-::
-
- if ( ! $this->input->is_method('post'))
- {
- echo 'This is NOT a POST request';
- }
- else
- {
- echo 'This is a POST request';
- }
-
+ echo $this->input->method(TRUE); // Outputs: POST
+ echo $this->input->method(FALSE); // Outputs: post
+ echo $this->input->method(); // Outputs: post