1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
result.php
См. документацию.
1<?php
8
9namespace Bitrix\Main\ORM\Data;
10
11use Bitrix\Main\ORM\EntityError;
12use Bitrix\Main\ORM\Fields\FieldError;
13use Bitrix\Main\ORM\Objectify\EntityObject;
14
16{
18 protected $wereErrorsChecked = false;
19
21 protected $object;
22
26 public function getObject()
27 {
28 return $this->object;
29 }
30
34 public function setObject($object)
35 {
36 $this->object = $object;
37 }
38
47 public function isSuccess($internalCall = false)
48 {
49 if (!$internalCall && !$this->wereErrorsChecked)
50 {
51 $this->wereErrorsChecked = true;
52 }
53
54 return parent::isSuccess();
55 }
56
62 public function getErrors()
63 {
64 $this->wereErrorsChecked = true;
65
66 return parent::getErrors();
67 }
68
74 public function getErrorMessages()
75 {
76 $this->wereErrorsChecked = true;
77
78 return parent::getErrorMessages();
79 }
80
81 public function __destruct()
82 {
83 if (!$this->isSuccess && !$this->wereErrorsChecked)
84 {
85 // nobody interested in my errors :(
86 // make a warning (usually it should be written in log)
87 trigger_error(join('; ', $this->getErrorMessages()), E_USER_WARNING);
88 }
89 }
90}
__destruct()
Определения result.php:81
getErrors()
Определения result.php:62
getObject()
Определения result.php:26
setObject($object)
Определения result.php:34
$wereErrorsChecked
Определения result.php:18
getErrorMessages()
Определения result.php:74
isSuccess($internalCall=false)
Определения result.php:47