public function QPACssEventHandler::directDescendant in QueryPath 7.3
Same name and namespace in other branches
- 6 qpa/qpa.classes.inc \QPACssEventHandler::directDescendant()
- 7.2 qpa/qpa.classes.inc \QPACssEventHandler::directDescendant()
Overrides CssEventHandler::directDescendant
File
- qpa/
qpa.classes.inc, line 177 - qpa.classes
Class
- QPACssEventHandler
- qpa.classes
Code
public function directDescendant() {
$found = array();
// For each match...
foreach ($this->matches as $m) {
// If it has children that are arrays...
$val = $this
->getVal($m);
if (is_array($val)) {
// Go through each child...
foreach ($val as $k => $v) {
// And add any elements found to the $found array.
if ($k[0] != '#') {
$found[] = array(
$m,
$k,
);
}
}
}
}
$this->matches = $found;
}