1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
context.php
См. документацию.
1
<?php
2
9
10
namespace
Bitrix\Main;
11
15
class
Context
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
49
public
function
__construct
(
Application
$application
)
50
{
51
$this->application =
$application
;
52
}
53
62
public
function
initialize
(
Request
$request
,
Response
$response
,
Server
$server
,
array
$params
= [])
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
95
public
function
setResponse
(
Response
$response
)
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
187
public
function
setCulture
(
Context
\
Culture
$culture
)
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
{
207
$this->language =
Localization\LanguageTable::wakeUpObject
(
$language
);
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
{
241
if
(
Application::hasInstance
())
242
{
243
$application
=
Application::getInstance
();
244
return
$application
->getContext();
245
}
246
247
return
null
;
248
}
249
}
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Main\Application
Определения
application.php:30
Bitrix\Main\Application\hasInstance
static hasInstance()
Определения
application.php:110
Bitrix\Main\Application\getInstance
static getInstance()
Определения
application.php:98
Bitrix\Main\Context\Culture
Определения
culture.php:14
Bitrix\Main\Context\getCulture
getCulture()
Определения
context.php:136
Bitrix\Main\Context\getEnvironment
getEnvironment()
Определения
context.php:70
Bitrix\Main\Context\getSite
getSite()
Определения
context.php:166
Bitrix\Main\Context\__construct
__construct(Application $application)
Определения
context.php:49
Bitrix\Main\Context\initialize
initialize(Request $request, Response $response, Server $server, array $params=[])
Определения
context.php:62
Bitrix\Main\Context\getCurrent
static getCurrent()
Определения
context.php:239
Bitrix\Main\Context\getSiteObject
getSiteObject()
Определения
context.php:176
Bitrix\Main\Context\$application
$application
Определения
context.php:18
Bitrix\Main\Context\getResponse
getResponse()
Определения
context.php:84
Bitrix\Main\Context\$language
$language
Определения
context.php:30
Bitrix\Main\Context\getLanguageObject
getLanguageObject()
Определения
context.php:156
Bitrix\Main\Context\setLanguage
setLanguage($language)
Определения
context.php:199
Bitrix\Main\Context\$site
$site
Определения
context.php:33
Bitrix\Main\Context\$env
$env
Определения
context.php:36
Bitrix\Main\Context\getApplication
getApplication()
Определения
context.php:126
Bitrix\Main\Context\$request
$request
Определения
context.php:24
Bitrix\Main\Context\getServer
getServer()
Определения
context.php:116
Bitrix\Main\Context\$server
$server
Определения
context.php:27
Bitrix\Main\Context\setResponse
setResponse(Response $response)
Определения
context.php:95
Bitrix\Main\Context\getRequest
getRequest()
Определения
context.php:106
Bitrix\Main\Context\$culture
$culture
Определения
context.php:39
Bitrix\Main\Context\setCulture
setCulture(Context\Culture $culture)
Определения
context.php:187
Bitrix\Main\Context\setSite
setSite($site)
Определения
context.php:219
Bitrix\Main\Context\$response
$response
Определения
context.php:21
Bitrix\Main\Context\getLanguage
getLanguage()
Определения
context.php:146
Bitrix\Main\Context\$params
$params
Определения
context.php:42
Bitrix\Main\EO_Site
Определения
orm.php:16557
Bitrix\Main\Environment
Определения
environment.php:8
Bitrix\Main\ORM\Data\DataManager\wakeUpObject
static wakeUpObject($row)
Определения
datamanager.php:256
Bitrix\Main\Request
Определения
request.php:10
Bitrix\Main\Response
Определения
response.php:5
Bitrix\Main\Server
Определения
server.php:11
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$application
$application
Определения
bitrix.php:23
$culture
$culture
Определения
include.php:61
Bitrix\Main\Context
Определения
culture.php:9
Bitrix\Main\Localization
Определения
culture.php:8
Bitrix\Main\ORM\Fields
Определения
arrayfield.php:9
Bitrix\Main\ORM
$response
$response
Определения
result.php:21
$site
$site
Определения
yandex_run.php:614
bitrix
modules
main
lib
context.php
Создано системой
1.14.0