Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
errorableimplementation.php
1
<?
2
namespace
Bitrix\Main
;
3
7
trait ErrorableImplementation
8
{
10
protected
$errorCollection;
11
17
public
function
hasErrors
()
18
{
19
if
($this->errorCollection instanceof
ErrorCollection
)
20
{
21
return
!$this->errorCollection->isEmpty();
22
}
23
else
24
{
25
return
false
;
26
}
27
}
28
34
public
function
getErrors
()
35
{
36
if
($this->errorCollection instanceof
ErrorCollection
)
37
{
38
return
$this->errorCollection->toArray();
39
}
40
else
41
{
42
return
[];
43
}
44
}
45
53
public
function
getErrorByCode
($code)
54
{
55
if
($this->errorCollection instanceof
ErrorCollection
)
56
{
57
return
$this->errorCollection->getErrorByCode($code);
58
}
59
else
60
{
61
return
null
;
62
}
63
}
64
}
Bitrix\Main\ErrorCollection
Definition
errorcollection.php:14
Bitrix\Main
Bitrix\Main\getErrors
getErrors()
Definition
errorableimplementation.php:34
Bitrix\Main\hasErrors
hasErrors()
Definition
errorableimplementation.php:17
Bitrix\Main\getErrorByCode
getErrorByCode($code)
Definition
errorableimplementation.php:53
modules
main
lib
errorableimplementation.php
Создано системой
1.10.0