Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
datetimezone.php
1
<?php
2
3
namespace
Bitrix\Calendar\Core\Base
;
4
5
use
Bitrix\Calendar\Util
;
6
7
class
DateTimeZone
extends
BaseProperty
8
{
9
protected
$timeZone
;
10
15
public
static
function
createByString
(
string
$timezone):
DateTimeZone
16
{
17
return
new
self
(
Util::prepareTimezone
($timezone));
18
}
19
20
public
function
__construct
(\
DateTimeZone
$timeZone
)
21
{
22
$this->timeZone =
$timeZone
;
23
}
24
28
public
function
getFields
(): array
29
{
30
return
[
31
'timeZone'
,
32
];
33
}
34
38
public
function
toString
(): string
39
{
40
return
$this->timeZone->getName();
41
}
42
46
public
function
getTimeZone
(): \
DateTimeZone
47
{
48
return
$this->timeZone
;
49
}
50
}
Bitrix\Calendar\Core\Base\BaseProperty
Definition
baseproperty.php:6
Bitrix\Calendar\Core\Base\DateTimeZone
Definition
datetimezone.php:8
Bitrix\Calendar\Core\Base\DateTimeZone\getTimeZone
getTimeZone()
Definition
datetimezone.php:46
Bitrix\Calendar\Core\Base\DateTimeZone\__construct
__construct(\DateTimeZone $timeZone)
Definition
datetimezone.php:20
Bitrix\Calendar\Core\Base\DateTimeZone\toString
toString()
Definition
datetimezone.php:38
Bitrix\Calendar\Core\Base\DateTimeZone\createByString
static createByString(string $timezone)
Definition
datetimezone.php:15
Bitrix\Calendar\Core\Base\DateTimeZone\$timeZone
$timeZone
Definition
datetimezone.php:9
Bitrix\Calendar\Core\Base\DateTimeZone\getFields
getFields()
Definition
datetimezone.php:28
Bitrix\Calendar\Util
Definition
util.php:16
Bitrix\Calendar\Util\prepareTimezone
static prepareTimezone(?string $tz=null)
Definition
util.php:75
Bitrix\Calendar\Core\Base
Definition
baseexception.php:3
modules
calendar
lib
core
base
datetimezone.php
Создано системой
1.10.0