Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
site.php
1<?php
9namespace Bitrix\Main\Context;
10
11use Bitrix\Main;
12
13class 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}
setCulture(Culture $culture)
Definition site.php:33
__construct($fields=null)
Definition site.php:20