Cookie_Backend
interface Cookie_Backend
The Cookie_Backend interface for use with Cookie::$inst
.
See Cookie_DefaultBackend and Cookie
Methods
__construct(array $cookies = array())
When creating the backend we want to store the existing cookies in our "existing" array. This allows us to distinguish between cookies we recieved or we set ourselves (and didn't get from the browser)
set(string $name, string $value, int $expiry = 90, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true)
Set a cookie
string|null
get(string $name, boolean $includeUnsent = true)
Get the cookie value by name
array
getAll(boolean $includeUnsent = true)
Get all the cookies
forceExpiry(string $name, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true)
Force the expiry of a cookie by name
Details
at line 20
__construct(array $cookies = array())
When creating the backend we want to store the existing cookies in our "existing" array. This allows us to distinguish between cookies we recieved or we set ourselves (and didn't get from the browser)
at line 33
set(string $name, string $value, int $expiry = 90, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true)
Set a cookie
at line 43
string|null
get(string $name, boolean $includeUnsent = true)
Get the cookie value by name
at line 51
array
getAll(boolean $includeUnsent = true)
Get all the cookies
at line 62
forceExpiry(string $name, string $path = null, string $domain = null, boolean $secure = false, boolean $httpOnly = true)
Force the expiry of a cookie by name