public function QueryPath::nextAll in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/QueryPath.php \QueryPath::nextAll()
- 7.2 QueryPath/QueryPath.php \QueryPath::nextAll()
File
- QueryPath/
QueryPath.php, line 1441
Class
Code
public function nextAll($selector = NULL) {
$found = new SplObjectStorage();
foreach ($this->matches as $m) {
while (isset($m->nextSibling)) {
$m = $m->nextSibling;
if ($m->nodeType === XML_ELEMENT_NODE) {
if (!empty($selector)) {
if (qp($m, NULL, $this->options)
->is($selector) > 0) {
$found
->attach($m);
}
}
else {
$found
->attach($m);
}
}
}
}
$this
->setMatches($found);
return $this;
}