Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
site.php
1
<?php
9
namespace
Bitrix\Main\Context
;
10
11
use
Bitrix\Main
;
12
13
class
Site
14
{
16
protected
$culture
;
17
18
protected
$fields
;
19
20
public
function
__construct
(
$fields
=
null
)
21
{
22
$this->fields =
$fields
;
23
}
24
25
public
function
getCulture
()
26
{
27
return
$this->culture
;
28
}
29
33
public
function
setCulture
(
Culture
$culture
)
34
{
35
$this->culture =
$culture
;
36
}
37
38
public
function
getLanguage
()
39
{
40
if
(isset($this->fields[
"LANGUAGE_ID"
]))
41
return
$this->fields[
"LANGUAGE_ID"
];
42
throw
new
Main\ObjectPropertyException
(
"language"
);
43
}
44
45
public
function
getDocRoot
()
46
{
47
if
(isset($this->fields[
"DOC_ROOT"
]))
48
return
$this->fields[
"DOC_ROOT"
];
49
throw
new
Main\ObjectPropertyException
(
"docRoot"
);
50
}
51
52
public
function
getId
()
53
{
54
if
(isset($this->fields[
"ID"
]))
55
return
$this->fields[
"ID"
];
56
throw
new
Main\ObjectPropertyException
(
"id"
);
57
}
58
}
Bitrix\Main\Context\Culture
Definition
culture.php:14
Bitrix\Main\Context\Site
Definition
site.php:14
Bitrix\Main\Context\Site\getCulture
getCulture()
Definition
site.php:25
Bitrix\Main\Context\Site\getId
getId()
Definition
site.php:52
Bitrix\Main\Context\Site\setCulture
setCulture(Culture $culture)
Definition
site.php:33
Bitrix\Main\Context\Site\getDocRoot
getDocRoot()
Definition
site.php:45
Bitrix\Main\Context\Site\$fields
$fields
Definition
site.php:18
Bitrix\Main\Context\Site\$culture
$culture
Definition
site.php:16
Bitrix\Main\Context\Site\__construct
__construct($fields=null)
Definition
site.php:20
Bitrix\Main\Context\Site\getLanguage
getLanguage()
Definition
site.php:38
Bitrix\Main\ObjectPropertyException
Definition
exception.php:181
Bitrix\Main\Context
Definition
culture.php:9
Bitrix\Main
modules
main
lib
context
site.php
Создано системой
1.10.0