wiki:Modules/Cookies

Cookie Module

This module wraps the cookie functionality of PHP. Using this class will make sure that your cookies are properly set (without rendering the "Headers already sent" error message)

Loading

This is a core module. It should be loaded automatically from within lepton.php.

Usage

$jar = Cookie::getInstance(Cookie);
$jar->set('my.cookie', 'value');

Notes

  • The cookie class could really do with a get() method. Implemented and committed
  • Since this class actually manages cookies, perhaps it should also be named cookies -noccy