public function previous(callable $callback = NULL) {
    $matches = [];
    foreach ($this->nodes as $node) {
      if ($match = $node->previous($callback)) {
        $matches[] = $match;
      }
    }
    return new NodeCollection($matches);
  }
public function previous(callable $callback = NULL) {
    $matches = [];
    foreach ($this->nodes as $node) {
      if ($match = $node->previous($callback)) {
        $matches[] = $match;
      }
    }
    return new NodeCollection($matches);
  }
public function previous ( callable $ callback = NULL ) { $ matches = [ ] ; foreach ( $ this -> nodes as $ node ) { if ( $ match = $ node -> previous ( $ callback ) ) { $ matches [ ] = $ match ; } } return new NodeCollection ( $ matches ) ; }
Get the immediately preceding sibling of each node in the set of matched
nodes. If a callback is provided, it retrieves the next sibling only if
the callback returns TRUE.
@param callable $callback An optional callback to filter by.
@return NodeCollection
Get the immediately preceding sibling of each node in the set of matched nodes . If a callback is provided it retrieves the next sibling only if the callback returns TRUE .