QueryPath\DOMQuery::end PHP Method

end() public method

DEPRECATED Do not use. This will revert back to the last set of matches (before the last "destructive" set of operations). This undoes any change made to the set of matched objects. Functions like find() and filter() change the list of matched objects. The end() function will revert back to the last set of matched items. Note that functions that modify the document, but do not change the list of matched objects, are not "destructive". Thus, calling append('something')->end() will not undo the append() call. Only one level of changes is stored. Reverting beyond that will result in an empty set of matches. Example:
See also: andSelf()
See also: add()
Deprecation: This function will be removed.
public end ( )
    public function end()
    {
        // Note that this does not use setMatches because it must set the previous
        // set of matches to empty array.
        $this->matches = $this->last;
        $this->last = new \SplObjectStorage();
        return $this;
    }