You are here

public function QueryPath::add in QueryPath 6

Same name and namespace in other branches
  1. 7.3 QueryPath/QueryPath.php \QueryPath::add()
  2. 7.2 QueryPath/QueryPath.php \QueryPath::add()

File

QueryPath/QueryPath.php, line 987

Class

QueryPath

Code

public function add($selector) {
  $this->last = $this->matches;
  foreach (qp($this->document, $selector, $this->options)
    ->get() as $item) {
    $this->matches
      ->attach($item);
  }
  return $this;
}