public function QueryPathCssEventHandler::directDescendant in QueryPath 7.3
Same name and namespace in other branches
- 6 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::directDescendant()
- 7.2 QueryPath/CssEventHandler.php \QueryPathCssEventHandler::directDescendant()
Overrides CssEventHandler::directDescendant
File
- QueryPath/
CssEventHandler.php, line 991
Class
Code
public function directDescendant() {
$this->findAnyElement = FALSE;
$kids = new SplObjectStorage();
foreach ($this->matches as $item) {
$kidsNL = $item->childNodes;
foreach ($kidsNL as $kidNode) {
if ($kidNode->nodeType == XML_ELEMENT_NODE) {
$kids
->attach($kidNode);
}
}
}
$this->matches = $kids;
}