Cookie
class Cookie
Manages cookies used by this application. The $_COOKIE superglobal variable is an associative array.
Methods
Deletes a cookie from the $_COOKIE superglobal variable.
The name of the cookie we want to work with that is found in the $_COOKIE superglobal.
Checks if a particular cookie exists in the $_COOKIE superglobal variable.
Sets a cookie to the $_COOKIE superglobal variable. Information that it needs are its name, a value, and the amount of time we want this cookie to exist.
Details
at line 16
static void
delete(string $name)
Deletes a cookie from the $_COOKIE superglobal variable.
at line 29
static string|int
get(string $name)
The name of the cookie we want to work with that is found in the $_COOKIE superglobal.
at line 42
static bool
exists(string $name)
Checks if a particular cookie exists in the $_COOKIE superglobal variable.
at line 58
static bool
set(string $name, string $value, int $expiry)
Sets a cookie to the $_COOKIE superglobal variable. Information that it needs are its name, a value, and the amount of time we want this cookie to exist.