public function add($selector) { // This is destructive, so we need to set $last: $this->last = $this->matches; foreach (QueryPath::with($this->document, $selector, $this->options)->get() as $item) { $this->matches->attach($item); } return $this; }