QueryPath\CSS\DOMTraverser::combineDirectDescendant PHP Method

combineDirectDescendant() public method

Check whether the given node is a rightly-related descendant of its parent node.
public combineDirectDescendant ( DOMNode $node, array $selectors, integer $index ) : boolean
$node DOMNode A DOM Node.
$selectors array The selectors array.
$index integer The current index to the operative simple selector in the selectors array.
return boolean TRUE if the combination matches, FALSE otherwise.
    public function combineDirectDescendant($node, $selectors, $index)
    {
        $parent = $node->parentNode;
        if (empty($parent)) {
            return false;
        }
        return $this->matchesSimpleSelector($parent, $selectors, $index);
    }