Source

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

<?php

class Trekel_Node_Selector_Descendant extends Trekel_Node_Selector {

  public function reduce ($node, $idx) {
    $this->initMatches();
    $this->initQueue($node->getChildren());
    while ($node = $this->dequeue()) {
      $this->matchType($node);
      $this->enqueue($node->getChildren());
    }
    return $this->getMatches();
  }

} // Trekel_Node_Selector_Descendant