cms_cookies
in package
FinalYes
A simple static class providing convenience utilities for working with cookies.
Tags
Table of Contents
Methods
- erase() : mixed
- Erase a cookie
- exists() : bool
- Test if a cookie exists.
- get() : mixed
- Get the value of a cookie
- set() : bool
- Set a cookie
Methods
erase()
Erase a cookie
public
static erase(string $key) : mixed
Parameters
- $key : string
-
The cookie name
exists()
Test if a cookie exists.
public
static exists(string $key) : bool
Parameters
- $key : string
-
The cookie name.
Tags
Return values
boolget()
Get the value of a cookie
public
static get(string $key) : mixed
Parameters
- $key : string
-
The cookie name
Tags
set()
Set a cookie
public
static set(string $key, string $value[, int $expire = 0 ]) : bool
Parameters
- $key : string
-
The cookie name
- $value : string
-
The cookie value
- $expire : int = 0
-
Unix timestamp of the time the cookie will expire. By default cookies that expire when the browser closes will be created.