2017 © Pedro Peláez
 

library specification

A PHP implementation of the Specification-pattern

image

rikbruil/specification

A PHP implementation of the Specification-pattern

  • Thursday, March 12, 2015
  • by rikbruil
  • Repository
  • 3 Watchers
  • 18 Stars
  • 76,437 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 5 % Grown

The README.md

Specification

Build Status Coverage Status Latest Stable Version License SensioLabsInsight, (*1)

PHP implementation of the Specification pattern, (*2)

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, (*3)

The Versions

12/03 2015

dev-master

9999999-dev

A PHP implementation of the Specification-pattern

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Rik Bruil

pattern specification

12/03 2015

0.9.4

0.9.4.0

A PHP implementation of the Specification-pattern

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Rik Bruil

pattern specification

08/03 2015

0.9.3

0.9.3.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Rik Bruil

pattern specification

08/03 2015

0.9.2

0.9.2.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Rik Bruil

pattern specification

08/03 2015

0.9.1

0.9.1.0

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

by Rik Bruil

pattern specification

08/03 2015

0.9

0.9.0.0

  Sources   Download

MIT

The Requires

  • php >=5.5

 

The Development Requires

by Rik Bruil

pattern specification