Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 1.35 KB

File metadata and controls

75 lines (51 loc) · 1.35 KB

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 this code on GitHub

Item.php

Item.php

SpecificationInterface.php

SpecificationInterface.php

OrSpecification.php

OrSpecification.php

PriceSpecification.php

PriceSpecification.php

AndSpecification.php

AndSpecification.php

NotSpecification.php

NotSpecification.php

Test

Tests/SpecificationTest.php

Tests/SpecificationTest.php