PHP Class MetaModels\Filter\Rules\Condition\ConditionOr

Inheritance: extends MetaModels\Filter\FilterRule
Afficher le fichier Open project: metamodels/core Class Usage Examples

Protected Properties

Свойство Type Description
$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).

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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

addChild() public méthode

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.
Résultat ConditionOr

getMatchingIds() public méthode

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
Résultat string[] | null

Property Details

$arrChildFilters protected_oe property

The list of child filters that shall be evaluated.
protected IFilter[],MetaModels\Filter $arrChildFilters
Résultat MetaModels\Filter\IFilter[]

$stopAfterMatch protected_oe property

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
Résultat boolean