MetaModels\Filter\Rules\Condition\ConditionOr::getMatchingIds PHP Method

getMatchingIds() public method

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
return string[] | null
    public function getMatchingIds()
    {
        $arrIds = array();
        foreach ($this->arrChildFilters as $objChildFilter) {
            $arrChildMatches = $objChildFilter->getMatchingIds();
            // NULL => all items - for OR conditions, this can never be more than all so we are already satisfied here.
            if ($arrChildMatches === null) {
                return null;
            }
            if ($arrChildMatches && $this->stopAfterMatch) {
                return $arrChildMatches;
            }
            if ($arrChildMatches) {
                $arrIds = array_merge($arrIds, $arrChildMatches);
            }
        }
        return array_unique($arrIds);
    }