You are here

public function QueryPathCssEventHandler::adjacent in QueryPath 7.2

Same name and namespace in other branches
  1. 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::adjacent()
  2. 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::adjacent()

Overrides CssEventHandler::adjacent

File

QueryPath/CssEventHandler.php, line 1006

Class

QueryPathCssEventHandler

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;
}