Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
13 | trait XPathMethods |
||
14 | { |
||
15 | /** |
||
16 | * Evaluate and return the result of a given XPath expression using this element as context node |
||
17 | */ |
||
18 | public function evaluate(string $expression): mixed |
||
21 | } |
||
22 | |||
23 | /** |
||
24 | * Evaluate and return the first element of a given XPath query using this element as context node |
||
25 | */ |
||
26 | public function firstOf(string $expression): ?DOMNode |
||
27 | { |
||
28 | return $this->ownerDocument->firstOf($expression, $this); |
||
29 | } |
||
30 | |||
31 | /** |
||
32 | * Evaluate and return the result of a given XPath query using this element as context node |
||
33 | */ |
||
34 | public function query(string $expression): DOMNodeList |
||
37 | } |
||
38 | } |