Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
base.php
1
<?php
8
namespace
Bitrix\Sender\Internals\QueryController
;
9
10
use
Bitrix\Main\ArgumentException
;
11
use
Bitrix\Main\Localization\Loc
;
12
13
Loc::loadMessages
(__FILE__);
14
19
class
Base
20
{
22
protected
$checkers
= array();
23
25
protected
$responseModifiers
= array();
26
34
public
function
addChecker
($checker)
35
{
36
if
(!is_callable($checker))
37
{
38
throw
new
ArgumentException
(
"Argument 'checker' should be callable."
);
39
}
40
41
$this->checkers[] = $checker;
42
return
$this;
43
}
50
public
function
setCheckers
(array
$checkers
)
51
{
52
foreach
(
$checkers
as $checker)
53
{
54
$this->
addChecker
($checker);
55
}
56
57
return
$this;
58
}
59
67
public
function
addResponseModifier
($modifier)
68
{
69
if
(!is_callable($modifier))
70
{
71
throw
new
ArgumentException
(
"Argument 'modifier' should be callable."
);
72
}
73
74
$this->responseModifiers[] = $modifier;
75
return
$this;
76
}
77
84
public
function
setResponseModifiers
(array $modifiers)
85
{
86
foreach
($modifiers as $modifier)
87
{
88
$this->
addResponseModifier
($modifier);
89
}
90
91
return
$this;
92
}
93
99
public
function
getCheckers
()
100
{
101
return
$this->checkers
;
102
}
103
109
public
function
getResponseModifiers
()
110
{
111
return
$this->responseModifiers
;
112
}
113
122
public
static
function
call
($callee, array $parameters = array())
123
{
124
if
(!is_callable($callee))
125
{
126
throw
new
ArgumentException
(
"Argument 'callee' should be callable."
);
127
}
128
129
return
call_user_func_array($callee, $parameters);
130
}
131
}
Bitrix\Main\ArgumentException
Definition
exception.php:34
Bitrix\Main\Localization\Loc
Definition
loc.php:11
Bitrix\Main\Localization\Loc\loadMessages
static loadMessages($file)
Definition
loc.php:64
Bitrix\Sender\Internals\QueryController\Base
Definition
base.php:20
Bitrix\Sender\Internals\QueryController\Base\getResponseModifiers
getResponseModifiers()
Definition
base.php:109
Bitrix\Sender\Internals\QueryController\Base\setCheckers
setCheckers(array $checkers)
Definition
base.php:50
Bitrix\Sender\Internals\QueryController\Base\call
static call($callee, array $parameters=array())
Definition
base.php:122
Bitrix\Sender\Internals\QueryController\Base\addResponseModifier
addResponseModifier($modifier)
Definition
base.php:67
Bitrix\Sender\Internals\QueryController\Base\addChecker
addChecker($checker)
Definition
base.php:34
Bitrix\Sender\Internals\QueryController\Base\$responseModifiers
$responseModifiers
Definition
base.php:25
Bitrix\Sender\Internals\QueryController\Base\getCheckers
getCheckers()
Definition
base.php:99
Bitrix\Sender\Internals\QueryController\Base\$checkers
$checkers
Definition
base.php:22
Bitrix\Sender\Internals\QueryController\Base\setResponseModifiers
setResponseModifiers(array $modifiers)
Definition
base.php:84
Bitrix\Sender\Internals\QueryController
Definition
action.php:8
modules
sender
lib
internals
querycontroller
base.php
Создано системой
1.10.0