Helpers\Cookie

Helpers\Cookie

The Cookie helper has the following methods:

Cookie::exists($key);

Returns true or false

Cookie::set($key, $value, $expiry = self::FOURYEARS, $path = "/", $domain = false);

$key - the name of the cookie

$value - the value the cookie holds

$expiry - time to hold the cookie

$path - the path the cookie accepts

domain - the domain to be used defaults to false

Cookie::get($key, $default = '')

Get the key from a cookie

Cookie::display()

Returns the $_COOKIE

Cookie::destroy($key, $path = "/", $domain = "")

Remove/Delete cookie match the id of $key

posted @ 2016-07-05 11:47  jinchunguang  阅读(100)  评论(0编辑  收藏  举报