perf2k2/yii2-facades

Facades for standard Yii2 application components

dev-master 2017-03-18 22:21 UTC

This package is auto-updated.

Last update: 2024-05-08 22:27:03 UTC


README

Build Status Coverage Status

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)