public function QueryPathCssEventHandler::adjacent in QueryPath 7.3
Same name and namespace in other branches
- 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::adjacent()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::adjacent()
Overrides CssEventHandler::adjacent
File
- QueryPath/
CssEventHandler.php, line 1006
Class
Code
public function adjacent() {
$this->findAnyElement = FALSE;
$found = new SplObjectStorage();
foreach ($this->matches as $item) {
if (isset($item->nextSibling) && $item->nextSibling->nodeType === XML_ELEMENT_NODE) {
$found
->attach($item->nextSibling);
}
}
$this->matches = $found;
}