summaryrefslogtreecommitdiffstats
path: root/user_guide_src
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2013-07-20 17:49:25 +0200
committerDerek Jones <derek.jones@ellislab.com>2013-07-20 17:49:25 +0200
commitb55d981d3febf3f2eca72cde5f11742a529e7f19 (patch)
treee0eb39a7c04f83ced69eeed17890d8daae08aaae /user_guide_src
parent333ad2e25052ae741e523b1396892f96f8ec6a32 (diff)
Update Cookie helper docs
Diffstat (limited to 'user_guide_src')
-rw-r--r--user_guide_src/source/helpers/cookie_helper.rst55
1 files changed, 29 insertions, 26 deletions
diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst
index c09f5eb4c..41a6d1c56 100644
--- a/user_guide_src/source/helpers/cookie_helper.rst
+++ b/user_guide_src/source/helpers/cookie_helper.rst
@@ -5,7 +5,12 @@ Cookie Helper
The Cookie Helper file contains functions that assist in working with
cookies.
-.. contents:: Page Contents
+.. contents::
+ :local:
+
+.. raw:: html
+
+ <div class="custom-index container"></div>
Loading this Helper
===================
@@ -14,14 +19,16 @@ This helper is loaded using the following code::
$this->load->helper('cookie');
+Available Functions
+===================
+
The following functions are available:
-set_cookie()
-============
-.. function:: set_cookie($name = '', $value = '', $expire = '', $domain = '', $path = '/', $prefix = '', $secure = FALSE, $httponly = FALSE)
+.. function:: set_cookie($name = ''[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]])
- :param string $name: Cookie name
+ :param mixed $name: Cookie name *or* associative array of all of
+ the parameters available to this function
:param string $value: Cookie value
:param int $expire: Number of seconds until expiration
:param string $domain: Cookie domain (usually: .yourdomain.com)
@@ -31,13 +38,11 @@ set_cookie()
:param bool $httponly: Whether to hide the cookie from JavaScript
:returns: void
-This helper function gives you view file friendly syntax to set browser
-cookies. Refer to the :doc:`Input Library <../libraries/input>` for a
-description of its use, as this function is an alias for
-``CI_Input::set_cookie()``.
+ This helper function gives you view file friendly syntax to set browser
+ cookies. Refer to the :doc:`Input Library <../libraries/input>` for a
+ description of its use, as this function is an alias for
+ ``CI_Input::set_cookie()``.
-get_cookie()
-============
.. function:: get_cookie($index = '', $xss_clean = FALSE)
@@ -45,12 +50,10 @@ get_cookie()
:param bool $xss_clean: Whether to apply XSS filtering to the returned value
:returns: mixed
-This helper function gives you view file friendly syntax to get browser
-cookies. Refer to the :doc:`Input Library <../libraries/input>` for a
-description of itsuse, as this function is an alias for ``CI_Input::cookie()``.
+ This helper function gives you view file friendly syntax to get browser
+ cookies. Refer to the :doc:`Input Library <../libraries/input>` for a
+ description of its use, as this function is an alias for ``CI_Input::cookie()``.
-delete_cookie()
-===============
.. function:: delete_cookie($name = '', $domain = '', $path = '/', $prefix = '')
@@ -60,18 +63,18 @@ delete_cookie()
:param string $prefix: Cookie name prefix
:returns: void
-Lets you delete a cookie. Unless you've set a custom path or other
-values, only the name of the cookie is needed.
+ Lets you delete a cookie. Unless you've set a custom path or other
+ values, only the name of the cookie is needed.
-::
+ ::
- delete_cookie('name');
+ delete_cookie('name');
-This function is otherwise identical to ``set_cookie()``, except that it
-does not have the value and expiration parameters. You can submit an
-array of values in the first parameter or you can set discrete
-parameters.
+ This function is otherwise identical to ``set_cookie()``, except that it
+ does not have the value and expiration parameters. You can submit an
+ array of values in the first parameter or you can set discrete
+ parameters.
-::
+ ::
- delete_cookie($name, $domain, $path, $prefix) \ No newline at end of file
+ delete_cookie($name, $domain, $path, $prefix) \ No newline at end of file