Cookie class
| package | Fuel | 
|---|---|
| category | Helpers | 
| author | Kohana Team | 
| modified | Fuel Development Team | 
| copyright | (c) 2008-2010 Kohana Team | 
| license | http://kohanaframework.org/license | 
| link | http://docs.fuelphp.com/classes/cookie.html | 
_init()
delete(string $name, string $path, string $domain, boolean $secure, boolean $http_only) : boolean
Cookie::delete('theme');
| uses | \Fuel\Core\static::set | 
|---|
stringcookie name
stringpath of the cookie
stringdomain of the cookie
booleanif true, the cookie should only be transmitted over a secure HTTPS connection
booleanif true, the cookie will be made accessible only through the HTTP protocol
booleanget(string $name, mixed $default) : string
Cookies without signatures will not be returned. If the cookie signature is present, but invalid, the cookie will be deleted.
// Get the "theme" cookie, or use "blue" if the cookie does not exist
$theme = Cookie::get('theme', 'blue');
stringcookie name
mixeddefault value to return
stringset(string $name, string $value, integer $expiration, string $path, string $domain, boolean $secure, boolean $http_only) : boolean
Note that all cookie values must be strings and no automatic serialization will be performed!
// Set the "theme" cookie
Cookie::set('theme', 'red');
stringname of cookie
stringvalue of cookie
integerlifetime in seconds
stringpath of the cookie
stringdomain of the cookie
booleanif true, the cookie should only be transmitted over a secure HTTPS connection
booleanif true, the cookie will be made accessible only through the HTTP protocol
boolean$config : array