@@ -42,6 +42,11 @@ The following functions are available:
4242 a description of its use, as this function is an alias for
4343 :php:meth: `CodeIgniter\\ HTTP\\ Response::setCookie() `.
4444
45+ .. note :: This helper function just sets browser cookies to the global response
46+ instance that ``Services::response() `` returns. So, if you create and
47+ return another response instance (e.g., if you call :php:func: `redirect() `),
48+ the cookies set here will not be sent automatically.
49+
4550.. php :function :: get_cookie($index[, $xssClean = false[, $prefix = '']])
4651
4752 :param string $index: Cookie name
@@ -78,6 +83,9 @@ The following functions are available:
7883 This function is otherwise identical to :php:func: `set_cookie() `, except that it
7984 does not have the ``value `` and ``expire `` parameters.
8085
86+ This also just sets browser cookies for deleting the cookies to the global
87+ response instance that ``Services::response() `` returns.
88+
8189 .. note :: When you use :php:func:`set_cookie()`,
8290 if the ``value `` is set to empty string and the ``expire `` is set to ``0 ``, the cookie will be deleted.
8391 If the ``value `` is set to non-empty string and the ``expire `` is set to ``0 ``, the cookie will only last as long as the browser is open.
@@ -95,4 +103,6 @@ The following functions are available:
95103 :param string $prefix: Cookie prefix
96104 :rtype: bool
97105
98- Checks if a cookie exists by name. This is an alias of ``Response::hasCookie() ``.
106+ Checks if a cookie exists by name in the global response instance that
107+ ``Services::response() `` returns. This is an alias of
108+ :php:meth: `CodeIgniter\\ HTTP\\ Response::hasCookie() `.
0 commit comments