Adventure Documentation

Cookies extends PlatformUtility
in package

Provides utilities for cookie data.

Tags

Table of Contents

get()  : mixed|null
Get value of a cookie.
getConsent()  : bool
Get the consent for a specific cookie type.
getTemplateCookies()  : array<string|int, mixed>
Get a list of all possible cookies on the template.
list()  : mixed|null
Get all cookies as an associative array.

Methods

get()

Get value of a cookie.

public get(string $key[, mixed $fallback = null ]) : mixed|null

If the cookie does not exists or is null, this function will return the provided default argument instead.

Parameters
$key : string
$fallback : mixed = null
Tags
Return values
mixed|null

getConsent()

Get the consent for a specific cookie type.

public getConsent(string $type) : bool

This function returns true if a the client has accpeted cookie of the specified type, otherwise false.

Parameters
$type : string
Tags
Return values
bool

getTemplateCookies()

Get a list of all possible cookies on the template.

public getTemplateCookies() : array<string|int, mixed>

This list is grouped by cookie category. It contains a detailed description of what each cookie is used for.

Tags
Return values
array<string|int, mixed>

list()

Get all cookies as an associative array.

public list() : mixed|null
Tags
Return values
mixed|null

        

Search results