https://github.com/phpdude/dudecookie
PHP Cookie helper class
https://github.com/phpdude/dudecookie
Last synced: 9 months ago
JSON representation
PHP Cookie helper class
- Host: GitHub
- URL: https://github.com/phpdude/dudecookie
- Owner: phpdude
- Created: 2011-07-27T16:07:45.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-09-24T18:34:00.000Z (over 14 years ago)
- Last Synced: 2025-03-18T04:43:20.011Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 95.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DudeCookie Project.
_Note: php5 only_
Cookie manager helper class. Provides you simple but powerfull cookie management for your project. It synchronize internal $_COOKIE array with functions for cookies management, it allows you in your code make situations like:
$cookie = new Dude_Cookie();
...
if($user)
{
$cookie->userid = $user['id'];
$cookie->userautologinhash = $user['uidhash'];
}
....
if($cookie->userid && $maAwesomeUsersmanager->processAutologin($_COOKIE['userautologinhash'])) { ..}
And don't think about saving setted cokies into $_COOKIE array or delete them wneh you delete something.
Basic features
- OOP PHP5 Code and features
- ArrayAccess class implementation: unset($cookie[$cookname])
- Default cookies configuration via setters/getters
- Synchronization $_COOKIE variable with setcookie() calls.