Method |
Description |
|
__construct ( array $cookies = [], array $config = [] ) |
Constructor. |
|
add ( Cookie $cookie ) |
Adds a cookie to the collection. |
|
count ( ) : integer |
Returns the number of cookies in the collection. |
|
fromArray ( array $array ) |
Populates the cookie collection from an array. |
|
get ( string $name ) : Cookie |
Returns the cookie with the specified name. |
|
getCount ( ) : integer |
Returns the number of cookies in the collection. |
|
getIterator ( ) : ArrayIterator |
Returns an iterator for traversing the cookies in the collection. |
|
getValue ( string $name, mixed $defaultValue = null ) : mixed |
Returns the value of the named cookie. |
|
has ( string $name ) : boolean |
Returns whether there is a cookie with the specified name. |
|
offsetExists ( string $name ) : boolean |
Returns whether there is a cookie with the specified name. |
|
offsetGet ( string $name ) : Cookie |
Returns the cookie with the specified name. |
|
offsetSet ( string $name, Cookie $cookie ) |
Adds the cookie to the collection. |
|
offsetUnset ( string $name ) |
Removes the named cookie. |
|
remove ( Cookie | string $cookie, boolean $removeFromBrowser = true ) |
Removes a cookie. |
|
removeAll ( ) |
Removes all cookies. |
|
toArray ( ) : array |
Returns the collection as a PHP array. |
|