rikbruil/specification
最新稳定版本:0.9.4
Composer 安装命令:
composer require rikbruil/specification
包简介
A PHP implementation of the Specification-pattern
关键字:
README 文档
README
PHP implementation of the Specification pattern
Usage
$overDue = new OverDueSpecification(); $noticeSent = new NoticeSentSpecification(); $inCollection = new InCollectionSpecification(); // example of specification pattern logic chaining $sendToCollection = $overDue->andX($noticeSent) ->not($inCollection); foreach ($service->getInvoices() as $currentInvoice) { if (! $sendToCollection->isSatisfiedBy($currentInvoice)) { continue; } $currentInvoice->sendToCollection(); }
Requirements
- PHP 5.3+
License
Specification is licensed under the MIT License - see the LICENSE file for details
统计信息
- 总下载量: 277.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 20
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-08