deesoft/yii2-tools
Composer 安装命令:
composer require deesoft/yii2-tools
包简介
Yii2 application tools
README 文档
README
Yii2 Tools
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require deesoft/yii2-tools "~1.0"
or add
"deesoft/yii2-tools": "~1.0"
to the require section of your composer.json file.
AutoHandlerBehavior
Define event handler in self class.
class User extends ActiveRecord { public function onBeforeSave($event) { // execute at event beforeSave // do someting } public function behaviors() { return [ 'dee\tools\AutoHandlerBehavior', ]; } }
State
Save information of client(browser).
// config 'components' => [ ... 'profile' => 'dee\tools\State', ]
Usage
// this information is unique per client. Yii::$app->profile->address = 'Jl. Buntu No 3426 Lamongan'; echo Yii::$app->profile->address;
统计信息
- 总下载量: 481
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 3
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-02-23