@@ 36-71 (lines=36) @@ | ||
33 | * |
|
34 | * @author Julien Fastré <[email protected]> |
|
35 | */ |
|
36 | class EffectiveTime extends AbstractElement |
|
37 | { |
|
38 | /** |
|
39 | * |
|
40 | * @var TimeStamp |
|
41 | */ |
|
42 | protected $timestamp; |
|
43 | ||
44 | public function __construct(TimeStamp $timestamp) |
|
45 | { |
|
46 | $this->setTimestamp($timestamp); |
|
47 | } |
|
48 | ||
49 | ||
50 | public function getTimestamp() |
|
51 | { |
|
52 | return $this->timestamp; |
|
53 | } |
|
54 | ||
55 | public function setTimestamp(TimeStamp $timestamp) |
|
56 | { |
|
57 | $this->timestamp = $timestamp; |
|
58 | ||
59 | return $this; |
|
60 | } |
|
61 | ||
62 | public function toDOMElement(\DOMDocument $doc) |
|
63 | { |
|
64 | return $this->createElement($doc, array('timestamp')); |
|
65 | } |
|
66 | ||
67 | protected function getElementTag() |
|
68 | { |
|
69 | return 'effectiveTime'; |
|
70 | } |
|
71 | } |
|
72 |
@@ 34-68 (lines=35) @@ | ||
31 | * |
|
32 | * @author julien |
|
33 | */ |
|
34 | class Time extends AbstractElement |
|
35 | { |
|
36 | /** |
|
37 | * |
|
38 | * @var TimeStamp |
|
39 | */ |
|
40 | protected $time; |
|
41 | ||
42 | public function __construct(TimeStamp $time) |
|
43 | { |
|
44 | $this->setTime($time); |
|
45 | } |
|
46 | ||
47 | public function getTime(): TimeStamp |
|
48 | { |
|
49 | return $this->time; |
|
50 | } |
|
51 | ||
52 | public function setTime(TimeStamp $time) |
|
53 | { |
|
54 | $this->time = $time; |
|
55 | ||
56 | return $this; |
|
57 | } |
|
58 | ||
59 | protected function getElementTag(): string |
|
60 | { |
|
61 | return 'time'; |
|
62 | } |
|
63 | ||
64 | public function toDOMElement(\DOMDocument $doc): \DOMElement |
|
65 | { |
|
66 | return $this->createElement($doc, array('time')); |
|
67 | } |
|
68 | } |
|
69 |