Total Complexity | 4 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 5 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
16 | class XPath extends AbstractDsElement |
||
17 | { |
||
18 | /** |
||
19 | * Construct an XPath element. |
||
20 | * |
||
21 | * @param string $expression The XPath expression itself. |
||
22 | */ |
||
23 | final public function __construct( |
||
24 | protected string $expression, |
||
25 | ) { |
||
26 | } |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Get the actual XPath expression. |
||
31 | * |
||
32 | * @return string |
||
33 | */ |
||
34 | public function getExpression(): string |
||
35 | { |
||
36 | return $this->expression; |
||
37 | } |
||
38 | |||
39 | |||
40 | /** |
||
41 | * Convert XML into a class instance |
||
42 | * |
||
43 | * @param DOMElement $xml |
||
44 | * @return static |
||
45 | * |
||
46 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException |
||
47 | * If the qualified name of the supplied element is wrong |
||
48 | */ |
||
49 | public static function fromXML(DOMElement $xml): static |
||
55 | } |
||
56 | |||
57 | |||
58 | /** |
||
59 | * @param DOMElement|null $parent |
||
60 | * @return DOMElement |
||
61 | */ |
||
62 | public function toXML(?DOMElement $parent = null): DOMElement |
||
70 |