Total Complexity | 6 |
Total Lines | 45 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
19 | class XPath |
||
20 | { |
||
21 | /** |
||
22 | * Get an instance of DOMXPath associated with a DOMNode |
||
23 | * |
||
24 | * @param \DOMNode $node The associated node |
||
25 | * @return \DOMXPath |
||
26 | */ |
||
27 | public static function getXPath(DOMNode $node): DOMXPath |
||
44 | } |
||
45 | |||
46 | /** |
||
47 | * Do an XPath query on an XML node. |
||
48 | * |
||
49 | * @param \DOMNode $node The XML node. |
||
50 | * @param string $query The query. |
||
51 | * @param \DOMXPath|null $xpCache The DOMXPath object or NULL to create one |
||
52 | * @return \DOMNode[] Array with matching DOM nodes. |
||
53 | */ |
||
54 | public static function xpQuery(DOMNode $node, string $query, DOMXPath $xpCache): array |
||
66 |