[ci skip] Clarify get_cookie(), CI_Input::cookie() docs
Close #3527
Close #3528
diff --git a/user_guide_src/source/helpers/cookie_helper.rst b/user_guide_src/source/helpers/cookie_helper.rst
index 22fd0f7..4a3298f 100644
--- a/user_guide_src/source/helpers/cookie_helper.rst
+++ b/user_guide_src/source/helpers/cookie_helper.rst
@@ -37,12 +37,11 @@
: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 @@
: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 @@
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 4464e0f..3bc0967 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -237,6 +237,10 @@
$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