perf2k2 / yii2-facades
Facades for standard Yii2 application components
dev-master
2017-03-18 22:21 UTC
Requires
- php: >=5.4.0
This package is auto-updated.
Last update: 2025-03-09 00:16:47 UTC
README
Why?
In order to install cookie code was not so
$cookies = Yii::$app->response->cookies; $cookies->add(new \yii\web\Cookie([ 'name' => 'language', 'value' => 'zh-CN', ]));
and so
Cookies::add('language', 'zh-CN');
Supported components
- Cache (part of it)
- Cookies (part of it)
- Db (part of it)
- Headers (part of it)
- Request (part of it)
- User (part of it)
- Auth (part of it)
- Session (part of it)
- Formatter (part of it)
Install
The fastest way is using composer:
$ composer require perf2k2/yii2-facades
License
MIT (see LICENSE.md)