Skip to content

Latest commit

 

History

History
 
 

Specification

Purpose

Builds a clear specification of business rules, where objects can be checked against. The composite specification class has one method called isSatisfiedBy that returns either true or false depending on whether the given object satisfies the specification.

Examples

UML Diagram

Alt Specification UML Diagram

Code

You can also find these code on GitHub

Item.php

Item.php

SpecificationInterface.php

SpecificationInterface.php

AbstractSpecification.php

AbstractSpecification.php

Either.php

Either.php

PriceSpecification.php

PriceSpecification.php

Plus.php

Plus.php

Not.php

Not.php

Test

Tests/SpecificationTest.php

Tests/SpecificationTest.php