Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
timezone.php
1<?php
2
3
5
6
8{
12 private $tzid;
16 private $tzurl;
20 private $standard;
24 private $daylight;
25
29 public static function createInstance(): Timezone
30 {
31 return new self();
32 }
33
37 public function __construct()
38 {
39
40 }
41
45 public function getType(): string
46 {
47 return 'VTIMEZONE';
48 }
49
53 public function getProperties(): array
54 {
55 return [
56 'TZID',
57 'TZURL'
58 ];
59 }
60
65 public function setTimezoneId(?ParserPropertyType $tzid): Timezone
66 {
67 $this->tzid = $tzid;
68
69 return $this;
70 }
71
77 {
78 $this->tzurl = $url;
79
80 return $this;
81 }
82
87 public function setSubComponents(iterable $subComponents): Timezone
88 {
89 foreach ($subComponents as $subComponent)
90 {
91 if ($subComponent instanceof Observance)
92 {
93 if ($subComponent instanceof StandardObservance)
94 {
95 $this->standard[] = $subComponent;
96 }
97 elseif($subComponent instanceof DaylightObservance)
98 {
99 $this->daylight[] = $subComponent;
100 }
101 }
102 }
103
104 return $this;
105 }
106
110 public function getContent(): void
111 {
112 // TODO: Implement getContent() method.
113 }
114
118 public function getTzUrl(): ?ParserPropertyType
119 {
120 return $this->tzurl;
121 }
122
126 public function getTzId(): ?ParserPropertyType
127 {
128 return $this->tzid;
129 }
130}
setTimezoneUrl(?ParserPropertyType $url)
Definition timezone.php:76
setSubComponents(iterable $subComponents)
Definition timezone.php:87
setTimezoneId(?ParserPropertyType $tzid)
Definition timezone.php:65