diff --git a/README.md b/README.md index d526aba..34dbe60 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,28 @@ Laravel like facades support for Yii 2 application components. Just what you wan [![Code Quality](https://img.shields.io/scrutinizer/g/sergeymakinen/yii2-facades.svg?style=flat-square)](https://scrutinizer-ci.com/g/sergeymakinen/yii2-facades) [![Packagist Version](https://img.shields.io/packagist/v/sergeymakinen/yii2-facades.svg?style=flat-square)](https://packagist.org/packages/sergeymakinen/yii2-facades) [![Total Downloads](https://img.shields.io/packagist/dt/sergeymakinen/yii2-facades.svg?style=flat-square)](https://packagist.org/packages/sergeymakinen/yii2-facades) [![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE) +## Table of contents + +* [Installation](#installation) +* [Usage](#usage) + * [Generate random string](#generate-random-string) + * [Fetch all users (just an example!)](#fetch-all-users-just-an-example) + * [Format currency](#format-currency) +* [Access properties](#access-properties) +* [Available facades](#available-facades) +* [Helpers](#helpers) + * [Cache](#cache) + * [cache](#cache-1) + * [get](#get) + * [Response](#response) + * [bare](#bare) + * [html](#html) + * [json](#json) + * [jsonp](#jsonp) + * [raw](#raw) + * [xml](#xml) +* [Extending](#extending) + ## Installation The preferred way to install this extension is through [composer](https://getcomposer.org/download/). @@ -68,7 +90,7 @@ After: $price = Formatter::asCurrency(123456.78, 'USD'); ``` -## Accessing properties +## Access properties Any class public property `$foo` can be got via an accessor: @@ -80,6 +102,121 @@ And set: ```php YourFacadeName::setFoo($value) ``` +## Available facades + +
Name | +Facaded component alias | +Component/interface | + + +
---|---|---|
Asset |
+Yii::$app->assetManager |
+yii\web\AssetManager |
+
Auth |
+Yii::$app->auth |
+yii\rbac\ManagerInterface |
+
Cache |
+Yii::$app->cache |
+yii\caching\Cache |
+
Db |
+Yii::$app->db |
+yii\db\Connection |
+
Error |
+Yii::$app->errorHandler |
+yii\console\ErrorHandler |
+
yii\web\ErrorHandler |
+||
Formatter |
+Yii::$app->formatter |
+yii\i18n\Formatter |
+
Http |
+Yii::$app->httpClient |
+yii\httpclient\Client |
+
I18n |
+Yii::$app->i18n |
+yii\i18n\I18N |
+
Log |
+Yii::$app->log |
+yii\log\Dispatcher |
+
Mailer |
+Yii::$app->mailer |
+yii\swiftmailer\Mailer |
+
Redis |
+Yii::$app->redis |
+yii\redis\Connection |
+
Request |
+Yii::$app->request |
+yii\console\Request |
+
yii\web\Request |
+||
Response |
+Yii::$app->response |
+yii\console\Response |
+
yii\web\Response |
+||
Router |
+Yii::$app->urlManager |
+yii\web\UrlManager |
+
Security |
+Yii::$app->security |
+yii\base\Security |
+
Session |
+Yii::$app->session |
+yii\web\Session |
+
Url |
+Yii::$app->urlManager |
+yii\web\UrlManager |
+
User |
+Yii::$app->user |
+yii\web\User |
+
View |
+Yii::$app->view |
+yii\web\View |
+