protected function QueryPathCssEventHandler::emptyElement in QueryPath 6
Same name and namespace in other branches
- 7.3 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::emptyElement()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::emptyElement()
1 call to QueryPathCssEventHandler::emptyElement()
- QueryPathCssEventHandler::pseudoClass in QueryPath/
CssEventHandler.php
File
- QueryPath/
CssEventHandler.php, line 867
Class
Code
protected function emptyElement() {
$found = new SplObjectStorage();
$matches = $this
->candidateList();
foreach ($matches as $item) {
$empty = TRUE;
foreach ($item->childNodes as $kid) {
if ($kid->nodeType == XML_ELEMENT_NODE || $kid->nodeType == XML_TEXT_NODE) {
$empty = FALSE;
break;
}
}
if ($empty) {
$found
->attach($item);
}
}
$this->matches = $found;
}