NotSpecification
extends CompositeSpecification
in package
Base class for specifications, allows for combining specifications
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Initializes the NotSpecification object
- andSpecification() : AndSpecification
- Returns a specification that satisfies the original specification as well as the other specification
- canBeSatisfiedBySomethingBelow() : bool
- Checks if anything under the directory path in value can possibly satisfy the specification.
- isSatisfiedBy() : bool
- Checks if the value meets the specification
- notSpecification() : NotSpecification
- Returns a specification that is the inverse of the original specification i.e. does not meet the original criteria
- orSpecification() : OrSpecification
- Returns a specification that satisfies the original specification or the other specification
- thatCanBeSatisfiedBySomethingBelow() : bool
- Provide default {@see canBeSatisfiedBySomethingBelow()} logic for specification classes that don't implement PrunableInterface
- thatWillBeSatisfiedByEverythingBelow() : bool
- Provide default {@see willBeSatisfiedByEverythingBelow()} logic for specification classes that don't implement PrunableInterface
- willBeSatisfiedByEverythingBelow() : bool
- Returns true if it is known or can be deduced that everything under the directory path in value will certainly satisfy the specification.
Properties
$wrapped
private
SpecificationInterface
$wrapped
Methods
__construct()
Initializes the NotSpecification object
public
__construct(SpecificationInterface $wrapped) : mixed
Parameters
- $wrapped : SpecificationInterface
andSpecification()
Returns a specification that satisfies the original specification as well as the other specification
public
andSpecification(SpecificationInterface $other) : AndSpecification
Parameters
- $other : SpecificationInterface
Return values
AndSpecificationcanBeSatisfiedBySomethingBelow()
Checks if anything under the directory path in value can possibly satisfy the specification.
public
canBeSatisfiedBySomethingBelow(array<string|int, mixed> $value) : bool
Parameters
- $value : array<string|int, mixed>
Tags
Return values
boolisSatisfiedBy()
Checks if the value meets the specification
public
isSatisfiedBy(array<string|int, mixed> $value) : bool
Parameters
- $value : array<string|int, mixed>
Return values
boolnotSpecification()
Returns a specification that is the inverse of the original specification i.e. does not meet the original criteria
public
notSpecification() : NotSpecification
Return values
NotSpecificationorSpecification()
Returns a specification that satisfies the original specification or the other specification
public
orSpecification(SpecificationInterface $other) : OrSpecification
Parameters
- $other : SpecificationInterface
Return values
OrSpecificationthatCanBeSatisfiedBySomethingBelow()
Provide default {@see canBeSatisfiedBySomethingBelow()} logic for specification classes that don't implement PrunableInterface
public
static thatCanBeSatisfiedBySomethingBelow(SpecificationInterface $that, array<string|int, mixed> $value) : bool
Parameters
- $that : SpecificationInterface
- $value : array<string|int, mixed>
Tags
Return values
boolthatWillBeSatisfiedByEverythingBelow()
Provide default {@see willBeSatisfiedByEverythingBelow()} logic for specification classes that don't implement PrunableInterface
public
static thatWillBeSatisfiedByEverythingBelow(SpecificationInterface $that, array<string|int, mixed> $value) : bool
Parameters
- $that : SpecificationInterface
- $value : array<string|int, mixed>
Tags
Return values
boolwillBeSatisfiedByEverythingBelow()
Returns true if it is known or can be deduced that everything under the directory path in value will certainly satisfy the specification.
public
willBeSatisfiedByEverythingBelow(array<string|int, mixed> $value) : bool
Parameters
- $value : array<string|int, mixed>