mikica/zf2-cookie

Simple controller plugin for reading and writing cookies

1.03 2015-11-13 16:20 UTC

This package is auto-updated.

Last update: 2024-04-27 03:14:58 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