public function QueryPathCssEventHandler::anyElementInNS in QueryPath 7.3
Same name and namespace in other branches
- 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::anyElementInNS()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::anyElementInNS()
Overrides CssEventHandler::anyElementInNS
File
- QueryPath/
CssEventHandler.php, line 185
Class
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;
}