dmitrymomot/cookie-helper

This package is abandoned and no longer maintained. No replacement package was suggested.

Simple class for working with cookie

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

This package is auto-updated.

Last update: 2024-03-12 21:19:08 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.