dmitrymomot/cookie-helper

Simple class for working with cookie

v1.0.0 2014-04-26 19:42 UTC

README

Simple class for working with cookie

Installation

This package is available via Composer:

{
    "require": {
        "dmitrymomot/cookie-helper": "1.*"
    }
}

Example of usage

$cookie = new \Helper\Cookie;
$cookie->set('cookie_name', 'cookie test value');

// returns for the first time - 'default value', after page reload - 'cookie test value'
echo $cookie->get('cookie_name', 'default value');

// delete cookie
$cookie->delete('cookie_name');

License

The MIT License (MIT). Please see License File for more information.