micica/zf2-cookie

用于读取和写入cookie的简单控制器插件

1.03 2015-11-13 16:20 UTC

This package is auto-updated.

Last update: 2024-08-27 03:51:35 UTC


README

#简单的控制器插件,用于读取和写入cookie。

##安装 composer install mikica/zf2-cookie

您需要注册新的模块。在文件config/application.config.php中添加:

'modules' => array(
    '...',
    'ZfCookie'
),

好了!模块已经准备好使用了。

##使用

<?php

$this->cookie('key'); //Read cookie
$this->cookie('key', 'value'); //Write cookie
$this->cookie($key, $value, $expires); //Write cookie