资源介绍
规格
PHP 实现
用法
$ 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 (!