class Cookie (View source)

Methods

static bool
has(string $key, bool $strict = false)

Check for existence of a key in the session collection

static bool
isEmpty()

Check if a collection is empty.

static mixed
get(string $key, mixed $default = null)

Allows you to retrieve a value or collection of cookie value.

static array
all()

Return all values of COOKIE

static bool
set(int|string $key, mixed $data, int $expiration = 3600)

Add a value to the cookie table.

static string|bool|null
remove(string $key)

Delete an entry in the table

Details

static bool has(string $key, bool $strict = false)

Check for existence of a key in the session collection

Parameters

string $key
bool $strict

Return Value

bool

static bool isEmpty()

Check if a collection is empty.

Return Value

bool

static mixed get(string $key, mixed $default = null)

Allows you to retrieve a value or collection of cookie value.

Parameters

string $key
mixed $default

Return Value

mixed

static array all()

Return all values of COOKIE

Return Value

array

static bool set(int|string $key, mixed $data, int $expiration = 3600)

Add a value to the cookie table.

Parameters

int|string $key
mixed $data
int $expiration

Return Value

bool

static string|bool|null remove(string $key)

Delete an entry in the table

Parameters

string $key

Return Value

string|bool|null