Criteria
in package
implements
PredicateCombinator
Tags
Table of Contents
Interfaces
- PredicateCombinator
- Enable filtering a record based on its value and/or its offset.
Properties
- $predicate : Predicate|Closure
Methods
- __invoke() : bool
- The class predicate method.
- all() : self
- Creates a new instance with predicates join using the logical AND operator.
- and() : self
- Return an instance with the specified predicates joined together and with the current predicate using the AND Logical operator.
- andNot() : self
- any() : self
- Creates a new instance with predicates join using the logical OR operator.
- filter() : Iterator
- Filters elements of an iterable structure using the class predicate method.
- none() : self
- Creates a new instance with predicates join using the logical NOT operator.
- not() : self
- Return an instance with the specified predicates joined together and with the current predicate using the NOT Logical operator.
- or() : self
- Return an instance with the specified predicates joined together and with the current predicate using the OR Logical operator.
- orNot() : self
- xany() : self
- Creates a new instance with predicates join using the logical XOR operator.
- xor() : self
- Return an instance with the specified predicates joined together and with the current predicate using the XOR Logical operator.
- xorNot() : self
- __construct() : mixed
Properties
$predicate read-only
private
Predicate|Closure
$predicate
Methods
__invoke()
The class predicate method.
public
__invoke(mixed $value, int|string $key) : bool
Evaluates each element of an iterable structure based on its value and its offset. The method must return true if the predicate is satisfied, false otherwise.
Parameters
- $value : mixed
- $key : int|string
Return values
boolall()
Creates a new instance with predicates join using the logical AND operator.
public
static all(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfand()
Return an instance with the specified predicates joined together and with the current predicate using the AND Logical operator.
public
and(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfandNot()
public
andNot(Predicate|Closure|callable ...$predicates) : self
Parameters
- $predicates : Predicate|Closure|callable
Return values
selfany()
Creates a new instance with predicates join using the logical OR operator.
public
static any(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selffilter()
Filters elements of an iterable structure using the class predicate method.
public
filter(iterable<string|int, mixed> $value) : Iterator
Parameters
- $value : iterable<string|int, mixed>
Return values
Iteratornone()
Creates a new instance with predicates join using the logical NOT operator.
public
static none(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfnot()
Return an instance with the specified predicates joined together and with the current predicate using the NOT Logical operator.
public
not(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfor()
Return an instance with the specified predicates joined together and with the current predicate using the OR Logical operator.
public
or(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selforNot()
public
orNot(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfxany()
Creates a new instance with predicates join using the logical XOR operator.
public
static xany(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfxor()
Return an instance with the specified predicates joined together and with the current predicate using the XOR Logical operator.
public
xor(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
selfxorNot()
public
xorNot(ConditionExtended ...$predicates) : self
Parameters
- $predicates : ConditionExtended
Return values
self__construct()
private
__construct(Condition $predicate) : mixed
Parameters
- $predicate : Condition