fenix440 / model-description
模型描述的获取器和设置器包。此包是项目 'Aedart\Model' 的一部分,访问 https://bitbucket.org/aedart/model 了解更多信息。官方子包网站(https://bitbucket.org/fenix440/model-description/)。
1.3.0
2015-06-21 18:32 UTC
Requires
- php: >=5.5.9
- aedart/validate: >=0.9.1 <2.0
Requires (Dev)
- aedart/license: 1.*
- aedart/license-file-manager: 1.*
- codeception/codeception: 2.0.*
Suggests
- aedart/model: Collection of getter- / setter-interfaces and traits for various common properties
README
某种模型描述的获取器和设置器包。
此包是项目 Aedart\Model
的一部分,访问 https://bitbucket.org/aedart/model 了解更多信息。
官方子包网站(https://bitbucket.org/fenix440/model-description)
内容
[目录]
何时使用此包
当您的组件需要知道某种描述时
如何安装
#!console
composer require fenix440/model-description 1.*
此包使用 composer。如果您不知道这是什么或它是如何工作的,我建议在尝试使用此包之前先了解一下。
快速开始
假设您有一个接口,例如产品的接口,您可以扩展描述感知接口;
#!php
<?php
use Fenix440\Model\Description\Interfaces\DescriptionAware;
interface IProduct extends DescriptionAware{
// ... Remaining interface implementation not shown
}
在您的类实现中,您只需使用其中一个描述特性。
#!php
<?php
use Fenix440\Model\Description\Traits\DescriptionTrait;
class MyProduct implements IProduct {
use DescriptionTrait;
// ... Remaining implementation not shown...
}
许可证
BSD-3-Clause,阅读此包中包含的 LICENSE 文件