You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: user_guide_src/source/outgoing/response.rst
+20-20Lines changed: 20 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -370,7 +370,7 @@ The methods provided by the parent class that are available are:
370
370
:param string $prefix: Cookie name prefix
371
371
:param bool $secure: Whether to only transfer the cookie through HTTPS
372
372
: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
374
374
:rtype: void
375
375
376
376
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:
386
386
387
387
**Notes**
388
388
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.
391
391
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
393
393
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
395
395
set to zero the cookie will only last as long as the browser is open.
396
396
397
397
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:
399
399
.your-domain.com
400
400
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.
402
402
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
404
404
other identically named cookies for your server.
405
405
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
407
407
by setting it to ``true``.
408
408
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 ``''``.
411
411
If set to blank string, default SameSite attribute will be set.
412
412
413
413
**Discrete Parameters**
@@ -429,14 +429,14 @@ The methods provided by the parent class that are available are:
429
429
430
430
**Notes**
431
431
432
-
Only the name is required.
432
+
Only the ``name`` is required.
433
433
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
435
435
other identically named cookies for your server.
436
436
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.
440
440
441
441
If any of the optional parameters are empty, then the same-named
442
442
cookie will be deleted across all that apply.
@@ -456,10 +456,10 @@ The methods provided by the parent class that are available are:
456
456
457
457
**Notes**
458
458
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.
460
460
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
463
463
has the prescribed value.
464
464
465
465
Example:
@@ -473,7 +473,7 @@ The methods provided by the parent class that are available are:
473
473
:rtype: ``Cookie|Cookie[]|null``
474
474
475
475
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.
0 commit comments