public function QueryPathCssEventHandler::adjacent in QueryPath 6
Same name and namespace in other branches
- 7.3 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;
}