Cookies
class Cookies implements Countable, IteratorAggregate
Cookies.
Properties
protected array | $cookies | Cookies. | |
protected Signer | $signer | Signer. |
Methods
int
count()
Returns the numner of cookies.
getIterator()
Retruns an array iterator object.
add(string $name, string $value)
Adds a cookie.
addSigned(string $name, string $value)
Adds a signed cookie.
bool
has(string $name)
Returns TRUE if the cookie exists and FALSE if not.
mixed
get(string $name, mixed $default = null)
Gets a cookie value.
mixed
getSigned(string $name, mixed $default = null)
Gets a signed cookie value.
remove(string $name)
Removes a cookie.
array
all()
Returns all the cookies.
Details
at line 43
__construct(array $cookies = [], Signer|null $signer = null)
Constructor.
at line 55
int
count()
Returns the numner of cookies.
at line 65
ArrayIterator
getIterator()
Retruns an array iterator object.
at line 76
add(string $name, string $value)
Adds a cookie.
at line 87
addSigned(string $name, string $value)
Adds a signed cookie.
at line 103
bool
has(string $name)
Returns TRUE if the cookie exists and FALSE if not.
at line 115
mixed
get(string $name, mixed $default = null)
Gets a cookie value.
at line 127
mixed
getSigned(string $name, mixed $default = null)
Gets a signed cookie value.
at line 147
remove(string $name)
Removes a cookie.
at line 157
array
all()
Returns all the cookies.