Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
result.php
1
<?php
9
namespace
Bitrix\Main\ORM\Data
;
10
11
use
Bitrix\Main\ORM\EntityError
;
12
use
Bitrix\Main\ORM\Fields\FieldError
;
13
use
Bitrix\Main\ORM\Objectify\EntityObject
;
14
15
class
Result
extends
\Bitrix\Main\Result
16
{
18
protected
$wereErrorsChecked
=
false
;
19
21
protected
$object
;
22
23
public
function
__construct
()
24
{
25
parent::__construct();
26
}
27
31
public
function
getObject
()
32
{
33
return
$this->object
;
34
}
35
39
public
function
setObject
(
$object
)
40
{
41
$this->
object
=
$object
;
42
}
43
52
public
function
isSuccess
($internalCall =
false
)
53
{
54
if
(!$internalCall && !$this->wereErrorsChecked)
55
{
56
$this->wereErrorsChecked =
true
;
57
}
58
59
return
parent::isSuccess();
60
}
61
67
public
function
getErrors
()
68
{
69
$this->wereErrorsChecked =
true
;
70
71
return
parent::getErrors();
72
}
73
79
public
function
getErrorMessages
()
80
{
81
$this->wereErrorsChecked =
true
;
82
83
return
parent::getErrorMessages();
84
}
85
86
public
function
__destruct
()
87
{
88
if
(!$this->
isSuccess
&& !$this->wereErrorsChecked)
89
{
90
// nobody interested in my errors :(
91
// make a warning (usually it should be written in log)
92
trigger_error(join(
'; '
, $this->
getErrorMessages
()), E_USER_WARNING);
93
}
94
}
95
}
Bitrix\Main\ORM\Data\Result
Definition
result.php:16
Bitrix\Main\ORM\Data\Result\__construct
__construct()
Definition
result.php:23
Bitrix\Main\ORM\Data\Result\$object
$object
Definition
result.php:21
Bitrix\Main\ORM\Data\Result\__destruct
__destruct()
Definition
result.php:86
Bitrix\Main\ORM\Data\Result\getErrors
getErrors()
Definition
result.php:67
Bitrix\Main\ORM\Data\Result\getObject
getObject()
Definition
result.php:31
Bitrix\Main\ORM\Data\Result\setObject
setObject($object)
Definition
result.php:39
Bitrix\Main\ORM\Data\Result\$wereErrorsChecked
$wereErrorsChecked
Definition
result.php:18
Bitrix\Main\ORM\Data\Result\getErrorMessages
getErrorMessages()
Definition
result.php:79
Bitrix\Main\ORM\Data\Result\isSuccess
isSuccess($internalCall=false)
Definition
result.php:52
Bitrix\Main\ORM\EntityError
Definition
entityerror.php:12
Bitrix\Main\ORM\Fields\FieldError
Definition
fielderror.php:14
Bitrix\Main\ORM\Objectify\EntityObject
Definition
entityobject.php:51
Bitrix\Main\Result\isSuccess
isSuccess()
Definition
result.php:39
Bitrix\Main\ORM\Data
Definition
addresult.php:9
modules
main
lib
orm
data
result.php
Создано системой
1.10.0