k1low/property-enum
最新稳定版本:v1.4.0
Composer 安装命令:
composer require k1low/property-enum
包简介
Property based enum plugin for CakePHP 3
README 文档
README
This plugin is PropertyStrategy of CakeDC/Enum
Installation
You can install this plugin into your CakePHP application using composer.
The recommended way to install composer packages is:
composer require k1low/property-enum
Property Example
class ArticlesTable extends Table { public $enums = [ 'status' => [ 'public' = 'Published'; 'draft' = 'Drafted'; 'archive' = 'Archived'; ], ]; public function initialize(array $config) { $this->addBehavior('PropertyEnum.Enum', ['lists' => [ 'status' => [ 'strategy' => 'property', ] ]]); } }
for CakePHP 2
统计信息
- 总下载量: 22.65k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-05