QueryPath\DOMQuery::add PHP Method

add() public method

This begins the new query at the top of the DOM again. The results found when running this selector are then merged into the existing results. In this way, you can add additional elements to the existing set.
See also: append()
See also: after()
See also: andSelf()
See also: end()
public add ( string $selector )
$selector string A valid selector.
    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;
    }