File tree Expand file tree Collapse file tree
user_guide_src/source/libraries Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,13 +32,23 @@ There are currently four (4) ways to create a new ``Cookie`` value object.
3232
3333When constructing the ``Cookie `` object, only the ``name `` attribute is required. All other else are optional.
3434If 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 ``
3641instance or an array of defaults to the static ``Cookie::setDefaults() `` method.
3742
3843.. literalinclude :: cookies/002.php
3944
4045Passing 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
4252behavior 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
You can’t perform that action at this time.
0 commit comments