The Cookie component defines an object-oriented layer for the Cookie handling.
# add a new cookie
$cookie = (new Flexic\Cookie\Cookie('new_cookie'))
->setValue('new_cookie')
->setExpiration(time() + 3600)
->save();
Flexic\Cookie\Manager::set($new_cookie);
$cookie = Flexic\Cookie\Manager::get('new_cookie');
# handle an existing cookie (Cookies which already stored from old sessions)
$cookie = Flexic\Cookie\Manager::get('old_cookie', true)
->setValue('new_cookie')
->setExpiration(time() + 3600)
->update();
Flexic\Cookie\Manager_:set($cookie, true);
$cookie = Flexic\Cookie\Manager::get('new_cookie');
# remove an cookie
Flexic\Cookie\Manager::delete('old_cookie');
# get all cookies
Flexic\Cookie\Manager::getCookieList();