protected function getPredicatesFromFilterCondition($filter)
    {
        $predicates = [];
        $regex = "/(^|\b)(\w+\:\w+)\.(l|u)(\b|$)/";
        foreach($filter as $key=>$condition)
        {
            if(is_string($key))
            {
                $numMatches = preg_match_all($regex, $key, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            if(is_string($condition))
            {
                $numMatches = preg_match_all($regex, $condition, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            elseif(is_array($condition))
            {
                array_merge($predicates, $this->getPredicatesFromFilterCondition($condition));
            }
        }
        return $predicates;
    }
protected function getPredicatesFromFilterCondition($filter)
    {
        $predicates = [];
        $regex = "/(^|\b)(\w+\:\w+)\.(l|u)(\b|$)/";
        foreach($filter as $key=>$condition)
        {
            if(is_string($key))
            {
                $numMatches = preg_match_all($regex, $key, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            if(is_string($condition))
            {
                $numMatches = preg_match_all($regex, $condition, $matches);
                for($i = 0; $i < $numMatches; $i++)
                {
                    if(isset($matches[2][$i]))
                    {
                        $predicates[] = $matches[2][$i];
                    }
                }
            }
            elseif(is_array($condition))
            {
                array_merge($predicates, $this->getPredicatesFromFilterCondition($condition));
            }
        }
        return $predicates;
    }
protected function getPredicatesFromFilterCondition ( $ filter ) { $ predicates = [ ] ; $ regex = "/(^|\b)(\w+\:\w+)\.(l|u)(\b|$)/" ; foreach ( $ filter as $ key => $ condition ) { if ( is_string ( $ key ) ) { $ numMatches = preg_match_all ( $ regex , $ key , $ matches ) ; for ( $ i = 0 ; $ i < $ numMatches ; $ i ++ ) { if ( isset ( $ matches [ 2 ] [ $ i ] ) ) { $ predicates [ ] = $ matches [ 2 ] [ $ i ] ; } } } if ( is_string ( $ condition ) ) { $ numMatches = preg_match_all ( $ regex , $ condition , $ matches ) ; for ( $ i = 0 ; $ i < $ numMatches ; $ i ++ ) { if ( isset ( $ matches [ 2 ] [ $ i ] ) ) { $ predicates [ ] = $ matches [ 2 ] [ $ i ] ; } } } elseif ( is_array ( $ condition ) ) { array_merge ( $ predicates , $ this -> getPredicatesFromFilterCondition ( $ condition ) ) ; } } return $ predicates ; }
Parses a specDocument's "filter" parameter for any predicates
@param $filter
@return array
Parses a specDocument s filter parameter for any predicates