\QueryPath\CSSTraverser

An object capable of walking (and searching) a datastructure.

Summary

Methods
Constants
find()
matches()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

find()

find(string  $selector) : \Traverser

Process a CSS selector and find matches.

This specifies a query to be run by the Traverser. A given Traverser may, in practice, delay the finding until some later time but must return the found results when getMatches() is called.

Parameters

string $selector

A selector. Typically this is a CSS 3 Selector.

Returns

\Traverser —

The Traverser that can return matches.

matches()

matches() : array

Get the results of a find() operation.

Return an array of matching items.

Returns

array —

An array of matched values. The specific data type in the matches will differ depending on the data type searched, but in the core QueryPath implementation, this will be an array of DOMNode objects.