blob: 6d16d63a5c912f35aaabcf41a1b533c448b69a69 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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();
}
|