Source

trekel / src / php / Trekel / Node / Selector / Child.php

Full commit
<?php

class Trekel_Node_Selector_Child extends Trekel_Node_Selector {

  public function reduce ($node, $idx) {
    //echo "reducing: " . get_class($node) . "\n";
    //echo "ident: " . $this->getIdentifier() . "\n";
    $type = $this->getIdentifier();
    $this->initMatches();
    foreach ($node->getChildren() as $child) {
      $this->matchType($child);
    }
    return $this->getMatches();
  }

}