Class yii\debug\components\search\Filter

Inheritanceyii\debug\components\search\Filter » yii\base\Component
Available since version2.0

Provides array filtering capabilities.

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$rules array Rules for matching filters in the way: [:fieldName => [rule1, rule2,. yii\debug\components\search\Filter

Public Methods

Hide inherited methods

MethodDescriptionDefined By
addMatcher() Adds data filtering rule. yii\debug\components\search\Filter
filter() Applies filter on a given array and returns filtered data. yii\debug\components\search\Filter

Property Details

$rules protected property

Rules for matching filters in the way: [:fieldName => [rule1, rule2,..]]

protected array $rules = []

Method Details

addMatcher() public method

Adds data filtering rule.

public void addMatcher ( $name, yii\debug\components\search\matchers\MatcherInterface $rule )
$name string

Attribute name

$rule yii\debug\components\search\matchers\MatcherInterface
filter() public method

Applies filter on a given array and returns filtered data.

public array filter ( array $data )
$data array

Data to filter

return array

Filtered data