You are here

public function QueryPathCssEventHandler::anyElementInNS in QueryPath 7.2

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

Overrides CssEventHandler::anyElementInNS

File

QueryPath/CssEventHandler.php, line 185

Class

QueryPathCssEventHandler

Code

public function anyElementInNS($ns) {
  $nsuri = $this->dom
    ->lookupNamespaceURI($ns);
  $found = new SplObjectStorage();
  if (!empty($nsuri)) {
    $matches = $this
      ->candidateList();
    foreach ($matches as $item) {
      if ($item instanceof DOMNode && $nsuri == $item->namespaceURI) {
        $found
          ->attach($item);
      }
    }
  }
  $this->matches = $found;
  $this->findAnyElement = FALSE;
}