FluentDOM\Nodes\Fetcher::fetchFor PHP Method

fetchFor() private method

Fetch the nodes for the provided context node. If $context ist NULL the document context is used. Use $filter and $stopAt to reduce the returned nodes.
private fetchFor ( string $expression, DOMNode $context = NULL, callable $filter = NULL, callable $stopAt = NULL, integer $options ) : array | boolean | DOMNodeList | float | string
$expression string
$context DOMNode
$filter callable
$stopAt callable
$options integer
return array | boolean | DOMNodeList | float | string
    private function fetchFor($expression, \DOMNode $context = NULL, callable $filter = NULL, callable $stopAt = NULL, $options = 0)
    {
        $nodes = $this->fetchNodes($expression, $context, $options);
        if ($filter || $stopAt) {
            return $this->filterNodes($nodes, $filter, $stopAt, $options);
        }
        return $nodes;
    }