Skip to content

Commit d217a13

Browse files
committed
docs: make function/method linkable
1 parent c500cda commit d217a13

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

user_guide_src/source/helpers/cookie_helper.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,12 @@ The following functions are available:
5555
This helper function gives you friendlier syntax to get browser
5656
cookies. Refer to the :doc:`IncomingRequest Library </incoming/incomingrequest>` for
5757
detailed description of its use, as this function acts very
58-
similarly to ``IncomingRequest::getCookie()``, except it will also prepend
58+
similarly to :php:meth:`CodeIgniter\\HTTP\\IncomingRequest::getCookie()`,
59+
except it will also prepend
5960
the ``Config\Cookie::$prefix`` that you might've set in your
6061
**app/Config/Cookie.php** file.
6162

62-
.. warning:: Using XSS filtering is a bad practice. It does not prevent XSS attacks perfectly. Using ``esc()`` with the correct ``$context`` in the views is recommended.
63+
.. warning:: Using XSS filtering is a bad practice. It does not prevent XSS attacks perfectly. Using :php:func:`esc()` with the correct ``$context`` in the views is recommended.
6364

6465
.. php:function:: delete_cookie($name[, $domain = ''[, $path = '/'[, $prefix = '']]])
6566
@@ -74,10 +75,10 @@ The following functions are available:
7475

7576
.. literalinclude:: cookie_helper/002.php
7677

77-
This function is otherwise identical to ``set_cookie()``, except that it
78+
This function is otherwise identical to :php:func:`set_cookie()`, except that it
7879
does not have the ``value`` and ``expire`` parameters.
7980

80-
.. note:: When you use ``set_cookie()``,
81+
.. note:: When you use :php:func:`set_cookie()`,
8182
if the ``value`` is set to empty string and the ``expire`` is set to ``0``, the cookie will be deleted.
8283
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.
8384

0 commit comments

Comments
 (0)