Definition at line 24 of file Indexer.php.
Public Member Functions | |
| __construct (XmlDb $xmlDb) | |
| query (string $xpath, ?int $docId=null) | |
| resolves an xpath query to a list of IndexerResult objects | |
Protected Member Functions | |
| splitAttribute (string $xpath) | |
| detects whether the xpath targets an attribute and separates the attribute reference from the element xpath. | |
Protected Attributes | |
| XmlDb | $xmlDb |
| __construct | ( | XmlDb | $xmlDb | ) |
| XmlDb | $xmlDb | the xmlDb instance to resolve against |
Definition at line 31 of file Indexer.php.
| query | ( | string | $xpath, |
| ?int | $docId = null ) |
the values of all matched nodes are fetched with a fixed number of queries (one for the node ids, one for the attributes/document ids and, for element targets, one for the text content of the subtrees), independent of the number of matches
| string | $xpath | xpath to target node or attribute |
| int | $docId | optional id of document to restrict to |
Definition at line 50 of file Indexer.php.
|
protected |
The xpath targets an attribute when its last path step is an attribute reference (".../@name"), optionally followed by a predicate. Attribute references inside a predicate ("...[@name]") are not mistaken for a targeted attribute, because the trailing reference must be preceded by a '/' and terminate the path.
| string | $xpath | xpath to analyze |
Definition at line 114 of file Indexer.php.
|
protected |
Definition at line 26 of file Indexer.php.