1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
context.php
См. документацию.
1<?php
2
9
10namespace Bitrix\Main;
11
16{
18 protected $application;
19
21 protected $response;
22
24 protected $request;
25
27 protected $server;
28
30 protected $language;
31
33 protected $site;
34
36 protected $env;
37
39 protected $culture;
40
42 protected $params;
43
50 {
51 $this->application = $application;
52 }
53
63 {
64 $this->request = $request;
65 $this->response = $response;
66 $this->server = $server;
67 $this->params = $params;
68 }
69
70 public function getEnvironment()
71 {
72 if ($this->env === null)
73 {
74 $this->env = new Environment($this->params['env']);
75 }
76 return $this->env;
77 }
78
84 public function getResponse()
85 {
86 return $this->response;
87 }
88
96 {
97 $this->response = $response;
98 return $this;
99 }
100
106 public function getRequest()
107 {
108 return $this->request;
109 }
110
116 public function getServer()
117 {
118 return $this->server;
119 }
120
126 public function getApplication()
127 {
128 return $this->application;
129 }
130
136 public function getCulture()
137 {
138 return $this->culture;
139 }
140
146 public function getLanguage()
147 {
148 return $this->language ? $this->language->getLid() : null;
149 }
150
156 public function getLanguageObject(): ?Localization\EO_Language
157 {
158 return $this->language;
159 }
160
166 public function getSite()
167 {
168 return $this->site ? $this->site->getLid() : null;
169 }
170
176 public function getSiteObject(): ?EO_Site
177 {
178 return $this->site;
179 }
180
188 {
189 $this->culture = $culture;
190 return $this;
191 }
192
199 public function setLanguage($language)
200 {
201 if ($language instanceof Localization\EO_Language)
202 {
203 $this->language = $language;
204 }
205 else
206 {
208 $this->language->fill(ORM\Fields\FieldTypeMask::SCALAR | ORM\Fields\FieldTypeMask::EXPRESSION);
209 }
210 return $this;
211 }
212
219 public function setSite($site)
220 {
221 if ($site instanceof EO_Site)
222 {
223 $this->site = $site;
224 }
225 else
226 {
227 $this->site = SiteTable::wakeUpObject($site);
228 $this->site->fill(ORM\Fields\FieldTypeMask::SCALAR | ORM\Fields\FieldTypeMask::EXPRESSION);
229 }
230 return $this;
231 }
232
239 public static function getCurrent()
240 {
242 {
244 return $application->getContext();
245 }
246
247 return null;
248 }
249}
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения catalog_reindex.php:36
static hasInstance()
Определения application.php:110
static getInstance()
Определения application.php:98
getCulture()
Определения context.php:136
getEnvironment()
Определения context.php:70
getSite()
Определения context.php:166
__construct(Application $application)
Определения context.php:49
initialize(Request $request, Response $response, Server $server, array $params=[])
Определения context.php:62
static getCurrent()
Определения context.php:239
getSiteObject()
Определения context.php:176
$application
Определения context.php:18
getResponse()
Определения context.php:84
$language
Определения context.php:30
getLanguageObject()
Определения context.php:156
setLanguage($language)
Определения context.php:199
$site
Определения context.php:33
$env
Определения context.php:36
getApplication()
Определения context.php:126
$request
Определения context.php:24
getServer()
Определения context.php:116
$server
Определения context.php:27
setResponse(Response $response)
Определения context.php:95
getRequest()
Определения context.php:106
$culture
Определения context.php:39
setCulture(Context\Culture $culture)
Определения context.php:187
setSite($site)
Определения context.php:219
$response
Определения context.php:21
getLanguage()
Определения context.php:146
$params
Определения context.php:42
Определения orm.php:16557
static wakeUpObject($row)
Определения datamanager.php:256
Определения request.php:10
Определения response.php:5
Определения server.php:11
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$application
Определения bitrix.php:23
$culture
Определения include.php:61
Определения culture.php:9
$response
Определения result.php:21
$site
Определения yandex_run.php:614