diff options
author | emkael <emkael@tlen.pl> | 2017-01-18 20:07:16 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2017-01-18 20:07:16 +0100 |
commit | 9a9c04512e5dcb77c7fe5d850e3f2a0250cc160e (patch) | |
tree | fed46b5f4c2ed3a050bb1a7ad7c6d0a3ea844d55 /lib/querypath/src/QueryPath/CSS/Traverser.php | |
parent | c5bcf8f74fb80b7e163663845b0d6e35cabface3 (diff) |
* Motor Sport Magazine feed provider
Diffstat (limited to 'lib/querypath/src/QueryPath/CSS/Traverser.php')
-rw-r--r-- | lib/querypath/src/QueryPath/CSS/Traverser.php | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/lib/querypath/src/QueryPath/CSS/Traverser.php b/lib/querypath/src/QueryPath/CSS/Traverser.php new file mode 100644 index 0000000..6d16d63 --- /dev/null +++ b/lib/querypath/src/QueryPath/CSS/Traverser.php @@ -0,0 +1,38 @@ +<?php +/** + * @file + * The main Traverser interface. + */ + +namespace QueryPath\CSS; + +/** + * An object capable of walking (and searching) a datastructure. + */ +interface 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. + * + * @param string $selector + * A selector. Typically this is a CSS 3 Selector. + * @return \Traverser + * The Traverser that can return matches. + */ + public function find($selector); + /** + * Get the results of a find() operation. + * + * Return an array of matching items. + * + * @return 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. + */ + public function matches(); +} |