Skip to content

Commit a36f180

Browse files
committed
docs: add sub section titles
1 parent 152a7a1 commit a36f180

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

user_guide_src/source/libraries/cookies.rst

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,23 @@ There are currently four (4) ways to create a new ``Cookie`` value object.
3232

3333
When constructing the ``Cookie`` object, only the ``name`` attribute is required. All other else are optional.
3434
If the optional attributes are not modified, their values will be filled up by the default values saved in
35-
the ``Cookie`` class. To override the defaults currently stored in the class, you can pass a ``Config\Cookie``
35+
the ``Cookie`` class.
36+
37+
Overriding Defaults
38+
===================
39+
40+
To override the defaults currently stored in the class, you can pass a ``Config\Cookie``
3641
instance or an array of defaults to the static ``Cookie::setDefaults()`` method.
3742

3843
.. literalinclude:: cookies/002.php
3944

4045
Passing the ``Config\Cookie`` instance or an array to ``Cookie::setDefaults()`` will effectively
41-
overwrite your defaults and will persist until new defaults are passed. If you do not want this
46+
overwrite your defaults and will persist until new defaults are passed.
47+
48+
Changing Defaults for a Limited Time
49+
------------------------------------
50+
51+
If you do not want this
4252
behavior but only want to change defaults for a limited time, you can take advantage of
4353
``Cookie::setDefaults()`` return which returns the old defaults array.
4454

0 commit comments

Comments
 (0)