ICookieManager View code

Extends

An interface to describe a CMSMS cookie manager.

package

CMS

since 2.3
license

GPL

Methods

get(string $key) : mixed

Get a cookie value

Arguments

string $key

The name of the cookie

Response

mixed

The output may be null, or a string or another data type.

set(string $key,  $value, integer $expires) : boolean

Set a cookie value.

Arguments

string $key

The name of the cookie

$value

integer $expires

The default expiry timestamp. if 0 is specified, then a session cookie is created.

Response

boolean

true on success

exists(string $key) : boolean

Test whether a cookie exists.

Arguments

string $key

The name of the cookie

Response

boolean

erase(string $key) 

Erase a cookie

Arguments

string $key

The name of the cookie