Column
in package
implements
Predicate
FinalYes
Enable filtering a record based on the value of a one of its cell.
When used with PHP's array_filter with the ARRAY_FILTER_USE_BOTH flag the record offset WILL NOT BE taken into account
Table of Contents
Interfaces
- Predicate
- Enable filtering a record based on its value and/or its offset.
Properties
- $column : string|int
- $operator : Comparison|Closure
- $value : mixed
Methods
- __invoke() : bool
- The class predicate method.
- filter() : Iterator
- Filters elements of an iterable structure using the class predicate method.
- filterOn() : self
- __construct() : mixed
Properties
$column read-only
public
string|int
$column
$operator read-only
public
Comparison|Closure
$operator
$value read-only
public
mixed
$value
Methods
__invoke()
The class predicate method.
public
__invoke(mixed $value, int|string $key) : bool
Parameters
- $value : mixed
- $key : int|string
Tags
Return values
boolfilter()
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
IteratorfilterOn()
public
static filterOn(string|int $column, Comparison|Closure|callable|string $operator[, mixed $value = null ]) : self
Parameters
- $column : string|int
- $operator : Comparison|Closure|callable|string
- $value : mixed = null
Tags
Return values
self__construct()
private
__construct(string|int $column, Comparison|Closure $operator, mixed $value) : mixed
Parameters
- $column : string|int
- $operator : Comparison|Closure
- $value : mixed