Documentation

Criteria
in package
implements PredicateCombinator

FinalYes
Tags
phpstan-import-type

Condition from PredicateCombinator

phpstan-import-type

ConditionExtended from PredicateCombinator

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

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
bool

all()

Creates a new instance with predicates join using the logical AND operator.

public static all(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

and()

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
self

andNot()

public andNot(Predicate|Closure|callable ...$predicates) : self
Parameters
$predicates : Predicate|Closure|callable
Return values
self

any()

Creates a new instance with predicates join using the logical OR operator.

public static any(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

filter()

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
Iterator

none()

Creates a new instance with predicates join using the logical NOT operator.

public static none(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

not()

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
self

or()

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
self

orNot()

public orNot(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

xany()

Creates a new instance with predicates join using the logical XOR operator.

public static xany(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

xor()

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
self

xorNot()

public xorNot(ConditionExtended ...$predicates) : self
Parameters
$predicates : ConditionExtended
Return values
self

__construct()

private __construct(Condition $predicate) : mixed
Parameters
$predicate : Condition

        
On this page

Search results