summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
authorMichiel Vugteveen <info@it-can.nl>2012-03-07 19:09:51 +0100
committerMichiel Vugteveen <info@it-can.nl>2012-03-07 19:09:51 +0100
commitbe0ca26c9006981eced5d938060ba5bad4145e3b (patch)
treef5b80b97a6f9c07637b76594bc8ef8945943728a /user_guide_src/source/libraries
parent1d571971be8be78a92d31aad27dda4009770043f (diff)
added method() and is_method()
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/input.rst31
1 files changed, 28 insertions, 3 deletions
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index bcf117358..96d1f07e1 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -99,7 +99,7 @@ The function returns FALSE (boolean) if there are no items in the POST.
::
- $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
+ $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
$this->input->post(); // returns all POST items without XSS filter
$this->input->get()
@@ -119,9 +119,9 @@ The function returns FALSE (boolean) if there are no items in the GET.
::
- $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
+ $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
$this->input->get(); // returns all GET items without XSS filtering
-
+
$this->input->get_post()
=========================
@@ -298,3 +298,28 @@ see if PHP is being run on the command line.
$this->input->is_cli_request()
+$this->input->method();
+=====================================
+
+Returns the $_SERVER['REQUEST_METHOD'] in 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';
+ }
+