public function previousAll(callable $callback = NULL) {
    $matches = [];
    foreach ($this->nodes as $node) {
      $matches = array_merge($matches, $node->previousAll($callback)->nodes);
    }
    return new NodeCollection($matches);
  }
public function previousAll(callable $callback = NULL) {
    $matches = [];
    foreach ($this->nodes as $node) {
      $matches = array_merge($matches, $node->previousAll($callback)->nodes);
    }
    return new NodeCollection($matches);
  }
public function previousAll ( callable $ callback = NULL ) { $ matches = [ ] ; foreach ( $ this -> nodes as $ node ) { $ matches = array_merge ( $ matches , $ node -> previousAll ( $ callback ) -> nodes ) ; } return new NodeCollection ( $ matches ) ; }
Get all preceding siblings of each node in the set of matched nodes,
optionally filtered by a callback.
@param callable $callback An optional callback to filter by.
@return NodeCollection
Get all preceding siblings of each node in the set of matched nodes optionally filtered by a callback .