Cookie
in package
Handle Cookie
Table of Contents
- get() : mixed
- Get the value from the cookie
- getJson() : mixed
- Get the value from the json-cookie
- setJson() : bool
- Sets and fills the cookie 'container' with json name:value
Methods
get()
Get the value from the cookie
public
static get(string $name) : mixed
Parameters
- $name : string
-
- element name
Return values
mixed —- the value
getJson()
Get the value from the json-cookie
public
static getJson(string $name) : mixed
Returns old one, if there is any
Parameters
- $name : string
-
- element name
Return values
mixed —- the value
setJson()
Sets and fills the cookie 'container' with json name:value
public
static setJson(array<string|int, mixed> $saCookies) : bool
If the value is empty, it deletes the name:val pair
Parameters
- $saCookies : array<string|int, mixed>
-
- name => value We use an array because of multiple settings on one page, e.g. options from radiobuttons after the submit
Return values
bool —- false if bot