diff options
author | Andrey Andreev <narf@devilix.net> | 2015-01-29 12:52:44 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2015-01-29 12:52:44 +0100 |
commit | b4834cc72cf0c861fa5e67494328bf958c386ecf (patch) | |
tree | c8712f8fe3297c6d45101e93408cffaf2180b930 /user_guide_src | |
parent | 5b662e4e7f3b47f658d2692f0b073da6a9c8a2e7 (diff) |
[ci skip] Clarify get_cookie(), CI_Input::cookie() docs
Close #3527
Close #3528
Diffstat (limited to 'user_guide_src')
-rw-r--r-- | user_guide_src/source/helpers/cookie_helper.rst | 19 | ||||
-rw-r--r-- | user_guide_src/source/libraries/input.rst | 4 |
2 files changed, 14 insertions, 9 deletions
diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst index 22fd0f77f..4a3298fb9 100644 --- a/user_guide_src/source/helpers/cookie_helper.rst +++ b/user_guide_src/source/helpers/cookie_helper.rst @@ -37,12 +37,11 @@ The following functions are available: :param bool $httponly: Whether to hide the cookie from JavaScript :rtype: 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 + This helper function gives you friendlier 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()``. - .. function:: get_cookie($index[, $xss_clean = NULL]]) :param string $index: Cookie name @@ -50,10 +49,12 @@ The following functions are available: :returns: The cookie value or NULL if not found :rtype: 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()``. - + This helper function gives you friendlier syntax to get browser + cookies. Refer to the :doc:`Input Library <../libraries/input>` for + detailed description of its use, as this function acts very + similarly to ``CI_Input::cookie()``, except it will also prepend + the ``$config['cookie_prefix']`` that you might've set in your + *application/config/config.php* file. .. function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]]]) @@ -75,4 +76,4 @@ The following functions are available: parameters. :: - delete_cookie($name, $domain, $path, $prefix)
\ No newline at end of file + delete_cookie($name, $domain, $path, $prefix); diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 4464e0fdc..3bc096705 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -237,6 +237,10 @@ Class Reference $this->input->cookie(array('some_cookie', 'some_cookie2')); + .. note:: Unlike the :doc:`Cookie Helper <../helpers/cookie_helper>` + function :func:`get_cookie()`, this method does NOT prepend + your configured ``$config['cookie_prefix']`` value. + .. method:: server($index[, $xss_clean = NULL]) :param mixed $index: Value name |