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(string|int $key, mixed $data, int $expirate = 3600, string $path = null, string $domain = null, bool $secure = false, bool $http = true)

Add a value to the cookie table.

static mixed
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(string|int $key, mixed $data, int $expirate = 3600, string $path = null, string $domain = null, bool $secure = false, bool $http = true)

Add a value to the cookie table.

Parameters

string|int $key
mixed $data
int $expirate
string $path
string $domain
bool $secure
bool $http

Return Value

bool

static mixed remove(string $key)

Delete an entry in the table

Parameters

string $key

Return Value

mixed