Total Complexity | 5 |
Total Lines | 58 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
15 | abstract class AbstractReference extends AbstractXencElement |
||
16 | { |
||
17 | /** @var string */ |
||
18 | protected $uri; |
||
19 | |||
20 | |||
21 | /** |
||
22 | * AbstractReference constructor. |
||
23 | * |
||
24 | * @param string $uri |
||
25 | */ |
||
26 | public function __construct(string $uri) |
||
29 | } |
||
30 | |||
31 | |||
32 | /** |
||
33 | * Get the value of the URI attribute of this reference. |
||
34 | * |
||
35 | * @return string |
||
36 | */ |
||
37 | public function getURI(): string |
||
40 | } |
||
41 | |||
42 | |||
43 | /** |
||
44 | * @param string $uri |
||
45 | */ |
||
46 | protected function setURI(string $uri): void |
||
50 | } |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @inheritDoc |
||
55 | */ |
||
56 | public static function fromXML(DOMElement $xml): object |
||
57 | { |
||
58 | Assert::same($xml->localName, static::getClassName(static::class)); |
||
59 | Assert::same($xml->namespaceURI, static::NS); |
||
60 | |||
61 | return new static(self::getAttribute($xml, 'URI')); |
||
62 | } |
||
63 | |||
64 | |||
65 | /** |
||
66 | * @inheritDoc |
||
67 | */ |
||
68 | public function toXML(DOMElement $parent = null): DOMElement |
||
73 | } |
||
74 | } |
||
75 |