Skip to content

Commit ee41951

Browse files
committed
docs: decorate variable names and values
1 parent 56962f8 commit ee41951

2 files changed

Lines changed: 22 additions & 22 deletions

File tree

user_guide_src/source/helpers/cookie_helper.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The following functions are available:
3131
:param string $prefix: Cookie name prefix
3232
:param bool $secure: Whether to only send the cookie through HTTPS
3333
:param bool $httpOnly: Whether to hide the cookie from JavaScript
34-
:param string $sameSite: The value for the SameSite cookie parameter. If null, the default from `config/App.php` is used
34+
:param string $sameSite: The value for the SameSite cookie parameter. If ``null``, the default from **app/Config/Cookie.php** is used
3535
:rtype: void
3636

3737
This helper function gives you friendlier syntax to set browser
@@ -69,7 +69,7 @@ The following functions are available:
6969
.. literalinclude:: cookie_helper/002.php
7070

7171
This function is otherwise identical to ``set_cookie()``, except that it
72-
does not have the value and expiration parameters. You can submit an
72+
does not have the ``value`` and ``expire`` parameters. You can submit an
7373
array of values in the first parameter or you can set discrete
7474
parameters.
7575

user_guide_src/source/outgoing/response.rst

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ The methods provided by the parent class that are available are:
370370
:param string $prefix: Cookie name prefix
371371
:param bool $secure: Whether to only transfer the cookie through HTTPS
372372
:param bool $httponly: Whether to only make the cookie accessible for HTTP requests (no JavaScript)
373-
:param string $samesite: The value for the SameSite cookie parameter. If set to ``''``, no SameSite attribute will be set on the cookie. If set to `null`, the default value from `config/App.php` will be used
373+
:param string $samesite: The value for the SameSite cookie parameter. If set to ``''``, no SameSite attribute will be set on the cookie. If set to ``null``, the default value from **app/Config/Cookie.php** will be used
374374
:rtype: void
375375

376376
Sets a cookie containing the values you specify. There are two ways to
@@ -386,28 +386,28 @@ The methods provided by the parent class that are available are:
386386

387387
**Notes**
388388

389-
Only the name and value are required. To delete a cookie set it with the
390-
expiration blank.
389+
Only the ``name`` and ``value`` are required. To delete a cookie set it with the
390+
``expire`` blank.
391391

392-
The expiration is set in **seconds**, which will be added to the current
392+
The ``expire`` is set in **seconds**, which will be added to the current
393393
time. Do not include the time, but rather only the number of seconds
394-
from *now* that you wish the cookie to be valid. If the expiration is
394+
from *now* that you wish the cookie to be valid. If the ``expire`` is
395395
set to zero the cookie will only last as long as the browser is open.
396396

397397
For site-wide cookies regardless of how your site is requested, add your
398-
URL to the **domain** starting with a period, like this:
398+
URL to the ``domain`` starting with a period, like this:
399399
.your-domain.com
400400

401-
The path is usually not needed since the method sets a root path.
401+
The ``path`` is usually not needed since the method sets a root path.
402402

403-
The prefix is only needed if you need to avoid name collisions with
403+
The ``prefix`` is only needed if you need to avoid name collisions with
404404
other identically named cookies for your server.
405405

406-
The secure flag is only needed if you want to make it a secure cookie
406+
The ``secure`` flag is only needed if you want to make it a secure cookie
407407
by setting it to ``true``.
408408

409-
The SameSite value controls how cookies are shared between domains and sub-domains.
410-
Allowed values are 'None', 'Lax', 'Strict' or a blank string ``''``.
409+
The ``samesite`` value controls how cookies are shared between domains and sub-domains.
410+
Allowed values are ``'None'``, ``'Lax'``, ``'Strict'`` or a blank string ``''``.
411411
If set to blank string, default SameSite attribute will be set.
412412

413413
**Discrete Parameters**
@@ -429,14 +429,14 @@ The methods provided by the parent class that are available are:
429429

430430
**Notes**
431431

432-
Only the name is required.
432+
Only the ``name`` is required.
433433

434-
The prefix is only needed if you need to avoid name collisions with
434+
The ``prefix`` is only needed if you need to avoid name collisions with
435435
other identically named cookies for your server.
436436

437-
Provide a prefix if cookies should only be deleted for that subset.
438-
Provide a domain name if cookies should only be deleted for that domain.
439-
Provide a path name if cookies should only be deleted for that path.
437+
Provide a ``prefix`` if cookies should only be deleted for that subset.
438+
Provide a ``domain`` name if cookies should only be deleted for that domain.
439+
Provide a ``path`` name if cookies should only be deleted for that path.
440440

441441
If any of the optional parameters are empty, then the same-named
442442
cookie will be deleted across all that apply.
@@ -456,10 +456,10 @@ The methods provided by the parent class that are available are:
456456

457457
**Notes**
458458

459-
Only the name is required. If a prefix is specified, it will be prepended to the cookie name.
459+
Only the ``name`` is required. If a ``prefix`` is specified, it will be prepended to the cookie name.
460460

461-
If no value is given, the method just checks for the existence of the named cookie.
462-
If a value is given, then the method checks that the cookie exists, and that it
461+
If no ``value`` is given, the method just checks for the existence of the named cookie.
462+
If a ``value`` is given, then the method checks that the cookie exists, and that it
463463
has the prescribed value.
464464

465465
Example:
@@ -473,7 +473,7 @@ The methods provided by the parent class that are available are:
473473
:rtype: ``Cookie|Cookie[]|null``
474474

475475
Returns the named cookie, if found, or ``null``.
476-
If no name is given, returns the array of ``Cookie`` objects.
476+
If no ``name`` is given, returns the array of ``Cookie`` objects.
477477

478478
Example:
479479

0 commit comments

Comments
 (0)