1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
request.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main;
4
9
abstract
class
Request
extends
Type\ParameterDictionary
10
{
14
protected
$server
;
15
protected
$requestedPage
=
null
;
16
protected
$requestedPageDirectory
=
null
;
17
18
public
function
__construct
(
Server
$server
,
array
$request
)
19
{
20
parent::__construct(
$request
);
21
22
$this->server =
$server
;
23
}
24
25
public
function
addFilter
(
Type
\
IRequestFilter
$filter
)
26
{
27
$filteredValues =
$filter
->filter($this->values);
28
29
if
($filteredValues !=
null
)
30
{
31
$this->
setValuesNoDemand
($filteredValues);
32
}
33
}
34
38
public
function
getServer
()
39
{
40
return
$this->server
;
41
}
42
43
public
function
getPhpSelf
()
44
{
45
return
$this->server->getPhpSelf();
46
}
47
48
public
function
getScriptName
()
49
{
50
return
$this->server->getScriptName();
51
}
52
53
public
function
getRequestedPage
()
54
{
55
if
($this->requestedPage ===
null
)
56
{
57
$page
= $this->
getScriptName
();
58
if
(!empty(
$page
))
59
{
60
$page
= IO\Path::normalize(
$page
);
61
62
if
(!str_starts_with(
$page
,
"/"
) && !preg_match(
"#^[a-z]:[/\\\\]#i"
,
$page
))
63
{
64
$page
=
"/"
.
$page
;
65
}
66
}
67
$this->requestedPage =
$page
;
68
}
69
70
return
$this->requestedPage
;
71
}
72
77
public
function
getRequestedPageDirectory
()
78
{
79
if
($this->requestedPageDirectory ===
null
)
80
{
81
$requestedPage
= $this->
getRequestedPage
();
82
$this->requestedPageDirectory = IO\Path::getDirectory(
$requestedPage
) .
'/'
;
83
}
84
return
$this->requestedPageDirectory
;
85
}
86
87
public
function
isAdminSection
()
88
{
89
$requestedDir = $this->
getRequestedPageDirectory
();
90
return
(str_starts_with($requestedDir,
"/bitrix/admin/"
)
91
|| str_starts_with($requestedDir,
"/bitrix/updates/"
)
92
|| (defined(
"ADMIN_SECTION"
) &&
ADMIN_SECTION
===
true
)
93
|| (defined(
"BX_PUBLIC_TOOLS"
) && BX_PUBLIC_TOOLS ===
true
)
94
);
95
}
96
101
public
function
isAjaxRequest
()
102
{
103
return
104
$this->server->get(
"HTTP_BX_AJAX"
) !==
null
||
105
$this->server->get(
"HTTP_X_REQUESTED_WITH"
) ===
"XMLHttpRequest"
;
106
}
107
}
$request
if(!Loader::includeModule('catalog')) if(!AccessController::getCurrent() ->check(ActionDictionary::ACTION_PRICE_EDIT)) if(!check_bitrix_sessid()) $request
Определения
catalog_reindex.php:36
Bitrix\Main\Request
Определения
request.php:10
Bitrix\Main\Request\getPhpSelf
getPhpSelf()
Определения
request.php:43
Bitrix\Main\Request\$requestedPageDirectory
$requestedPageDirectory
Определения
request.php:16
Bitrix\Main\Request\isAjaxRequest
isAjaxRequest()
Определения
request.php:101
Bitrix\Main\Request\__construct
__construct(Server $server, array $request)
Определения
request.php:18
Bitrix\Main\Request\addFilter
addFilter(Type\IRequestFilter $filter)
Определения
request.php:25
Bitrix\Main\Request\$requestedPage
$requestedPage
Определения
request.php:15
Bitrix\Main\Request\getRequestedPage
getRequestedPage()
Определения
request.php:53
Bitrix\Main\Request\getScriptName
getScriptName()
Определения
request.php:48
Bitrix\Main\Request\getServer
getServer()
Определения
request.php:38
Bitrix\Main\Request\$server
$server
Определения
request.php:14
Bitrix\Main\Request\isAdminSection
isAdminSection()
Определения
request.php:87
Bitrix\Main\Request\getRequestedPageDirectory
getRequestedPageDirectory()
Определения
request.php:77
Bitrix\Main\Server
Определения
server.php:11
Bitrix\Main\Type\ParameterDictionary
Определения
parameterdictionary.php:8
Bitrix\Main\Type\ParameterDictionary\setValuesNoDemand
setValuesNoDemand(array $values)
Определения
parameterdictionary.php:14
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$filter
$filter
Определения
iblock_catalog_list.php:54
Bitrix\Main\Type\IRequestFilter
Определения
irequestfilter.php:5
Bitrix\Main\Type
Определения
collection.php:2
ADMIN_SECTION
const ADMIN_SECTION
Определения
rss.php:2
$page
$page
Определения
order_form.php:33
bitrix
modules
main
lib
request.php
Создано системой
1.14.0