Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
timezone.php
1
<?php
2
3
4
namespace
Bitrix\Calendar\ICal\Builder
;
5
6
7
use
Bitrix\Calendar\ICal\Basic\BasicComponent
;
8
use
Bitrix\Calendar\ICal\Basic\Content
;
9
use
Bitrix\Calendar\ICal\Basic\Observance
;
10
use
Bitrix\Calendar\Util
;
11
use DateTimeZone;
12
13
class
Timezone
extends
BasicComponent
implements
BuilderComponent
14
{
15
private
$id;
16
private
$observances = [];
17
18
public
static
function
createInstance
():
Timezone
19
{
20
return
new
self
();
21
}
22
23
public
function
__construct
()
24
{
25
}
26
27
public
function
getType
(): string
28
{
29
return
'VTIMEZONE'
;
30
}
31
32
public
function
getProperties
(): array
33
{
34
return
[
35
'TZID'
,
36
];
37
}
38
43
public
function
setTimezoneId
(DateTimeZone $tz):
Timezone
44
{
45
$this->
id
= $tz->getName();
46
47
return
$this;
48
}
49
50
public
function
setObservance
(
Observance
$observance)
51
{
52
$this->observances[] = $observance;
53
54
return
$this;
55
}
56
60
public
function
setContent
():
Content
61
{
62
return
Content::getInstance($this->
getType
())
63
->
textProperty
(
'TZID'
, $this->
id
)
64
->subComponent(...$this->observances);
65
}
66
}
Bitrix\Calendar\ICal\Basic\BasicComponent
Definition
basiccomponent.php:10
Bitrix\Calendar\ICal\Basic\Content
Definition
content.php:8
Bitrix\Calendar\ICal\Basic\Content\textProperty
textProperty($names, ?string $value, bool $disableEscaping=false)
Definition
content.php:48
Bitrix\Calendar\ICal\Basic\Observance
Definition
observance.php:12
Bitrix\Calendar\ICal\Builder\Timezone
Definition
timezone.php:14
Bitrix\Calendar\ICal\Builder\Timezone\__construct
__construct()
Definition
timezone.php:23
Bitrix\Calendar\ICal\Builder\Timezone\setTimezoneId
setTimezoneId(DateTimeZone $tz)
Definition
timezone.php:43
Bitrix\Calendar\ICal\Builder\Timezone\getType
getType()
Definition
timezone.php:27
Bitrix\Calendar\ICal\Builder\Timezone\setObservance
setObservance(Observance $observance)
Definition
timezone.php:50
Bitrix\Calendar\ICal\Builder\Timezone\setContent
setContent()
Definition
timezone.php:60
Bitrix\Calendar\ICal\Builder\Timezone\getProperties
getProperties()
Definition
timezone.php:32
Bitrix\Calendar\ICal\Builder\Timezone\createInstance
static createInstance()
Definition
timezone.php:18
Bitrix\Calendar\Util
Definition
util.php:16
Bitrix\Calendar\ICal\Builder\BuilderComponent
Definition
buildercomponent.php:10
Bitrix\Calendar\ICal\Builder
Definition
alert.php:4
modules
calendar
lib
ical
builder
timezone.php
Создано системой
1.10.0