2017 © Pedro Peláez
 

library specifier

A library to help implement the specification design pattern

image

atyagi/specifier

A library to help implement the specification design pattern

  • Sunday, June 28, 2015
  • by atyagi
  • Repository
  • 0 Watchers
  • 0 Stars
  • 7 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Specifier

Build Status Coverage Status Latest Version, (*1)

Provides a basic set of classes to utilize the specification design pattern., (*2)

Usage

The included tests provide common usage of the classes., (*3)

Basic Usage

Upon creating your specification classes, simply extend the AbstractSpecification class and implement the isSatisfiedBy method., (*4)

Any specifications that you create are flexible enough to take in any arguments in the constructor, such as repositories or services., (*5)

In addition, an isNotSatisfiedBy method is provided to provide a logical not if needed., (*6)

Composite Usage

When you need to chain multiple specifications on the same object, you can leverage the AbstractSpecification chain methods plus and either., (*7)

For example:, (*8)

(new CustomerIsPremium())
    ->either(new CustomerRegisteredBeforeLastWeek())
    ->isSatisfiedBy($customer);

or, (*9)

(new CustomerIsPremium())
    ->plus(new CustomerRegisteredBeforeLastWeek())
    ->isSatisfiedBy($customer);

The Versions

28/06 2015

dev-master

9999999-dev

A library to help implement the specification design pattern

  Sources   Download

MIT

The Development Requires

by Ankit Tyagi

specification design patterns domain driven design

28/06 2015

v1.0.0

1.0.0.0

A library to help implement the specification design pattern

  Sources   Download

MIT

The Development Requires

by Ankit Tyagi

specification design patterns domain driven design