Download the PHP package chenqd/yii2-presenter without Composer
On this page you can find all versions of the php package chenqd/yii2-presenter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download chenqd/yii2-presenter
More information about chenqd/yii2-presenter
Files in chenqd/yii2-presenter
Download chenqd/yii2-presenter
More information about chenqd/yii2-presenter
Files in chenqd/yii2-presenter
Vendor chenqd
Package yii2-presenter
Short Description presenter and helper console command for yii2
License
Package yii2-presenter
Short Description presenter and helper console command for yii2
License
Please rate this library. Is it a good library?
Informations about the package yii2-presenter
yii2-presenter
参考 laracasts/presenter 实现presenter层, 调整了调用方式并新增了一个脚手架工具。
个人理解Presenter是提供给view针对model的一种横向扩展方式, 就实现来说是对behavior的简化版。
使用方式
presenter例子:
拓展类实现:
view调用: (实现很简单可以简单翻阅下源码)
动态切换persenter
Model类处理
view调用:
脚手架
进入console对应的配置文件添加
如果要指定生成文件位置
使用
其它
默认脚手架生成presenter到models/presenters文件下 (高级模板在common/models/presenters), 在model中使用时可以不指定 $presenter
TODO
- [ ] 多model关联的实现方案
- [ ] 由Present发起调用的实现方案
All versions of yii2-presenter with dependencies
PHP Build Version
Package Version
The package chenqd/yii2-presenter contains the following files
Loading the files please wait ....