private function getFiltersByRef(\DOMXPath $xpath, \DomNode $rootNode, $searchPath, array $availableFilters)
    {
        $filters     = [];
        $filterNodes = $xpath->query($searchPath, $rootNode);

        foreach ($filterNodes as $filterNode) {
            $filterName = $filterNode->getAttribute('ref');
            if (in_array($filterName, $availableFilters)) {
                $filters[] = $filterName;
            }
        }

        return $filters;
    }
private function getFiltersByRef(\DOMXPath $xpath, \DomNode $rootNode, $searchPath, array $availableFilters)
    {
        $filters     = [];
        $filterNodes = $xpath->query($searchPath, $rootNode);

        foreach ($filterNodes as $filterNode) {
            $filterName = $filterNode->getAttribute('ref');
            if (in_array($filterName, $availableFilters)) {
                $filters[] = $filterName;
            }
        }

        return $filters;
    }
private function getFiltersByRef ( \ DOMXPath $ xpath , \ DomNode $ rootNode , $ searchPath , array $ availableFilters ) { $ filters = [ ] ; $ filterNodes = $ xpath -> query ( $ searchPath , $ rootNode ) ; foreach ( $ filterNodes as $ filterNode ) { $ filterName = $ filterNode -> getAttribute ( 'ref' ) ; if ( in_array ( $ filterName , $ availableFilters ) ) { $ filters [ ] = $ filterName ; } } return $ filters ; }
Return all filters under a root node filtered by an array of available filters.

@param \DOMXPath $xpath            XPath access to the document parsed.
@param \DomNode  $rootNode         Search root node.
@param string    $searchPath       Filters search path.
@param array     $availableFilters List of available filters.

@return array
Return all filters under a root node filtered by an array of available filters .