public function has(callable $callback) {
    $matches = [];
    foreach ($this->nodes as $node) {
      if ($node instanceof ParentNode && $node->has($callback)) {
        $matches[] = $node;
      }
    }
    return new NodeCollection($matches, FALSE);
  }
public function has(callable $callback) {
    $matches = [];
    foreach ($this->nodes as $node) {
      if ($node instanceof ParentNode && $node->has($callback)) {
        $matches[] = $node;
      }
    }
    return new NodeCollection($matches, FALSE);
  }
public function has ( callable $ callback ) { $ matches = [ ] ; foreach ( $ this -> nodes as $ node ) { if ( $ node instanceof ParentNode && $ node -> has ( $ callback ) ) { $ matches [ ] = $ node ; } } return new NodeCollection ( $ matches , FALSE ) ; }
Reduce the set of matched nodes to those that have a descendant that
match.
@param callable $callback Callback to test for match.
@return NodeCollection
Reduce the set of matched nodes to those that have a descendant that match .