public function previousUntil(callable $callback, $inclusive = FALSE) {
    $matches = [];
    foreach ($this->nodes as $node) {
      $matches = array_merge($matches, $node->previousUntil($callback, $inclusive)->nodes);
    }
    return new NodeCollection($matches);
  }
public function previousUntil(callable $callback, $inclusive = FALSE) {
    $matches = [];
    foreach ($this->nodes as $node) {
      $matches = array_merge($matches, $node->previousUntil($callback, $inclusive)->nodes);
    }
    return new NodeCollection($matches);
  }
public function previousUntil ( callable $ callback , $ inclusive = FALSE ) { $ matches = [ ] ; foreach ( $ this -> nodes as $ node ) { $ matches = array_merge ( $ matches , $ node -> previousUntil ( $ callback , $ inclusive ) -> nodes ) ; } return new NodeCollection ( $ matches ) ; }
Get all preceding siblings of each node up to the node matched by the
callback.
@param callable $callback Callback to test for match.
@param bool $inclusive TRUE to include the node matched by callback.
@return NodeCollection
Get all preceding siblings of each node up to the node matched by the callback .