public function QueryPathCssEventHandler::sibling in QueryPath 7.3
Same name and namespace in other branches
- 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::sibling()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::sibling()
Overrides CssEventHandler::sibling
File
- QueryPath/
CssEventHandler.php, line 1034
Class
Code
public function sibling() {
$this->findAnyElement = FALSE;
if ($this->matches
->count() > 0) {
$sibs = new SplObjectStorage();
foreach ($this->matches as $item) {
while ($item->nextSibling != NULL) {
$item = $item->nextSibling;
if ($item->nodeType === XML_ELEMENT_NODE) {
$sibs
->attach($item);
}
}
}
$this->matches = $sibs;
}
}