MaskSelectorInterface
extends
ArraySelectorInterface
in
Interface for selecting elements from an array view by boolean mask.
Table of Contents
Methods
- compatibleWith() : bool
- Checks if the selector is compatible with the given view.
- getValue() : array<string|int, bool>
- Return boolean mask array.
- select() : ArrayViewInterface<string|int, T>
- Selects elements from a source array view based on the selector criteria.
Methods
compatibleWith()
Checks if the selector is compatible with the given view.
public
compatibleWith(ArrayViewInterface<string|int, T> $view) : bool
Parameters
- $view : ArrayViewInterface<string|int, T>
-
the view to check compatibility with.
Tags
Return values
bool —true if the element is compatible, false otherwise
getValue()
Return boolean mask array.
public
getValue() : array<string|int, bool>
Return values
array<string|int, bool>select()
Selects elements from a source array view based on the selector criteria.
public
select(ArrayViewInterface<string|int, T> $source[, bool|null $readonly = null ]) : ArrayViewInterface<string|int, T>
Parameters
- $source : ArrayViewInterface<string|int, T>
-
The source array view to select elements from.
- $readonly : bool|null = null
-
Flag indicating if the result view should be read-only.
Tags
Return values
ArrayViewInterface<string|int, T> —A new view with selected elements from the source.