mikica / zf2-cookie
Simple controller plugin for reading and writing cookies
Installs: 68
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 0
Open Issues: 0
Type:plugin
Requires
- php: >=5.4
- zendframework/zendframework: 2.5.*
This package is auto-updated.
Last update: 2024-11-27 04:17:55 UTC
README
#Simple controller plugin for reading and writing cookies.
##Installation
composer install mikica/zf2-cookie
You need to register new module. Add in file config/application.config.php:
'modules' => array(
'...',
'ZfCookie'
),
Voila! The module is ready to use.
##Usage
<?php $this->cookie('key'); //Read cookie $this->cookie('key', 'value'); //Write cookie $this->cookie($key, $value, $expires); //Write cookie