Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
base.php
1
<?php
2
3
4
namespace
Bitrix\Main\Engine\ActionFilter
;
5
6
7
use
Bitrix\Main\Engine\Action
;
8
use
Bitrix\Main\Engine\Controller
;
9
use
Bitrix\Main\Error
;
10
use
Bitrix\Main\ErrorCollection
;
11
use
Bitrix\Main\Errorable
;
12
use
Bitrix\Main\Event
;
13
14
abstract
class
Base
implements
Errorable
15
{
17
protected
$errorCollection
;
19
protected
$action
;
20
25
final
public
static
function
className
()
26
{
27
return
get_called_class();
28
}
29
33
public
function
__construct
()
34
{
35
$this->errorCollection =
new
ErrorCollection
;
36
}
37
38
final
public
function
bindAction
(
Action
$action
)
39
{
40
$this->action =
$action
;
41
42
return
$this;
43
}
44
48
final
public
function
getAction
()
49
{
50
return
$this->action
;
51
}
52
57
public
function
listAllowedScopes
()
58
{
59
return
array(
60
Controller::SCOPE_REST
,
61
Controller::SCOPE_AJAX
,
62
Controller::SCOPE_CLI
,
63
);
64
}
65
66
public
function
onBeforeAction
(
Event
$event)
67
{
68
}
69
70
public
function
onAfterAction
(
Event
$event)
71
{
72
}
73
80
protected
function
addError
(
Error
$error)
81
{
82
$this->errorCollection[] = $error;
83
84
return
$this;
85
}
86
91
final
public
function
getErrors
()
92
{
93
return
$this->errorCollection->toArray();
94
}
95
101
final
public
function
getErrorByCode
($code)
102
{
103
return
$this->errorCollection->getErrorByCode($code);
104
}
105
}
Bitrix\Main\Engine\ActionFilter\Base
Definition
base.php:15
Bitrix\Main\Engine\ActionFilter\Base\addError
addError(Error $error)
Definition
base.php:80
Bitrix\Main\Engine\ActionFilter\Base\__construct
__construct()
Definition
base.php:33
Bitrix\Main\Engine\ActionFilter\Base\getAction
getAction()
Definition
base.php:48
Bitrix\Main\Engine\ActionFilter\Base\bindAction
bindAction(Action $action)
Definition
base.php:38
Bitrix\Main\Engine\ActionFilter\Base\onAfterAction
onAfterAction(Event $event)
Definition
base.php:70
Bitrix\Main\Engine\ActionFilter\Base\onBeforeAction
onBeforeAction(Event $event)
Definition
base.php:66
Bitrix\Main\Engine\ActionFilter\Base\getErrors
getErrors()
Definition
base.php:91
Bitrix\Main\Engine\ActionFilter\Base\$errorCollection
$errorCollection
Definition
base.php:17
Bitrix\Main\Engine\ActionFilter\Base\$action
$action
Definition
base.php:19
Bitrix\Main\Engine\ActionFilter\Base\getErrorByCode
getErrorByCode($code)
Definition
base.php:101
Bitrix\Main\Engine\ActionFilter\Base\listAllowedScopes
listAllowedScopes()
Definition
base.php:57
Bitrix\Main\Engine\ActionFilter\Base\className
static className()
Definition
base.php:25
Bitrix\Main\Engine\Action
Definition
action.php:17
Bitrix\Main\Engine\Controller
Definition
controller.php:32
Bitrix\Main\Engine\Controller\SCOPE_AJAX
const SCOPE_AJAX
Definition
controller.php:34
Bitrix\Main\Engine\Controller\SCOPE_CLI
const SCOPE_CLI
Definition
controller.php:35
Bitrix\Main\Engine\Controller\SCOPE_REST
const SCOPE_REST
Definition
controller.php:33
Bitrix\Main\ErrorCollection
Definition
errorcollection.php:14
Bitrix\Main\Error
Definition
error.php:14
Bitrix\Main\Event
Definition
event.php:5
Bitrix\Main\Errorable
Definition
errorable.php:6
Bitrix\Main\Engine\ActionFilter
Definition
authentication.php:4
modules
main
lib
engine
actionfilter
base.php
Создано системой
1.10.0