leehoo-response-log/yii2-leehoo-yctools

This package is abandoned and no longer maintained. The author suggests using the leehoo-response-log/yii2-leehoo-yctools package instead.

响应日志+Debug+接口返回json+操作文件+其他常用

dev-main 2021-09-17 10:21 UTC

This package is not auto-updated.

Last update: 2021-09-17 10:23:42 UTC


README

响应日志+Debug+接口返回json+操作文件+其他常用

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist leehoo-response-log/yii2-leehoo-yctools "*"

or add

"leehoo-response-log/yii2-leehoo-yctools": "*"

to the require section of your composer.json file.

Usage

  • 响应日志使用ResponseLog举例:
<?= 
'data' => [
            'class' => 'app\modules\data\Module',
            'on beforeAction' => function (yii\base\ActionEvent $event) {
                \leehooyctools\ResponseLog::initClass();
            },
            'on afterAction' => function ($event) {
                \leehooyctools\ResponseLog::getClass()->saveIn();
            }
        ], ?>```