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