PHP Класс MetaModels\Filter\Rules\Condition\ConditionOr

Наследование: extends MetaModels\Filter\FilterRule
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$arrChildFilters MetaModels\Filter\IFilter[] The list of child filters that shall be evaluated.
$stopAfterMatch boolean This flag determines if the rule shall return the result of the first child that returns at least one element (a return value of NULL from a rule counts as "all ids" in this context and therefore is considered non empty per definition).

Открытые методы

Метод Описание
__construct ( boolean $stopAfterMatch = false ) Create a new FilterRule instance.
addChild ( MetaModels\Filter\IFilter $objFilter ) : ConditionOr Adds a child filter to this rule that will get evaluated when this rule is evaluated.
getMatchingIds ( ) : string[] | null Fetch the ids from all child filter rules.

Описание методов

__construct() публичный Метод

Create a new FilterRule instance.
public __construct ( boolean $stopAfterMatch = false )
$stopAfterMatch boolean Flag determining if filtering shall return the first non-empty match.

addChild() публичный Метод

Adds a child filter to this rule that will get evaluated when this rule is evaluated.
public addChild ( MetaModels\Filter\IFilter $objFilter ) : ConditionOr
$objFilter MetaModels\Filter\IFilter The filter to add as child.
Результат ConditionOr

getMatchingIds() публичный Метод

If no entries have been found, the result is an empty array. If no filtering was applied and therefore all ids shall be reported as valid, the return value of NULL is allowed. The OR filter rule has an embedded shortcut for the first rule that returns "null". When this happens, no further child rules will get evaluated, as the result set can not expand any further. Note: when "stopAfterMatch" has been set, the rule will stop processing also when the first rule returns a non empty result and return that result.
public getMatchingIds ( ) : string[] | null
Результат string[] | null

Описание свойств

$arrChildFilters защищенное свойство

The list of child filters that shall be evaluated.
protected IFilter[],MetaModels\Filter $arrChildFilters
Результат MetaModels\Filter\IFilter[]

$stopAfterMatch защищенное свойство

This flag determines if the rule shall return the result of the first child that returns at least one element (a return value of NULL from a rule counts as "all ids" in this context and therefore is considered non empty per definition).
protected bool $stopAfterMatch
Результат boolean