summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/helpers/cookie_helper.rst
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2014-01-06 09:57:05 +0100
committerAndrey Andreev <narf@devilix.net>2014-01-06 09:57:05 +0100
commit04535c7169aa9401a3cf09c256df8319a67b778e (patch)
tree68502d4113be68a6bedd15a961193bad4b2ce9f0 /user_guide_src/source/helpers/cookie_helper.rst
parentfd7d9caa71e960f2bec806da423eb8d93419e24c (diff)
[ci skip] Update the Input library and Cookie helper docs
Diffstat (limited to 'user_guide_src/source/helpers/cookie_helper.rst')
-rw-r--r--user_guide_src/source/helpers/cookie_helper.rst43
1 files changed, 20 insertions, 23 deletions
diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst
index e70893f2f..2e8db5f31 100644
--- a/user_guide_src/source/helpers/cookie_helper.rst
+++ b/user_guide_src/source/helpers/cookie_helper.rst
@@ -25,18 +25,17 @@ Available Functions
The following functions are available:
-.. function:: set_cookie([$name = ''[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]]])
-
- :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)
- :param string $path: Cookie path
- :param string $prefix: Cookie name prefix
- :param bool $secure: Whether to only send the cookie through HTTPS
- :param bool $httponly: Whether to hide the cookie from JavaScript
- :returns: void
+.. function:: set_cookie($name[, $value = ''[, $expire = ''[, $domain = ''[, $path = '/'[, $prefix = ''[, $secure = FALSE[, $httponly = FALSE]]]]]]]])
+
+ :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)
+ :param string $path: Cookie path
+ :param string $prefix: Cookie name prefix
+ :param bool $secure: Whether to only send the cookie through HTTPS
+ :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
@@ -44,28 +43,27 @@ The following functions are available:
``CI_Input::set_cookie()``.
-.. function:: get_cookie([$index = ''[, $xss_clean = FALSE]])
+.. function:: get_cookie($index[, $xss_clean = FALSE]])
- :param string $index: Cookie name
- :param bool $xss_clean: Whether to apply XSS filtering to the returned value
- :returns: mixed
+ :param string $index: Cookie name
+ :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 its use, as this function is an alias for ``CI_Input::cookie()``.
-.. function:: delete_cookie([$name = ''[, $domain = ''[, $path = '/'[, $prefix = '']]]])
+.. function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]])
- :param string $name: Cookie name
- :param string $domain: Cookie domain (usually: .yourdomain.com)
- :param string $path: Cookie path
- :param string $prefix: Cookie name prefix
+ :param string $name: Cookie name
+ :param string $domain: Cookie domain (usually: .yourdomain.com)
+ :param string $path: Cookie path
+ :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.
-
::
delete_cookie('name');
@@ -74,7 +72,6 @@ The following functions are available:
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