1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
Result.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Im\V2;
4
8
class
Result
extends
\Bitrix\Main\Result
9
{
10
protected
bool
$hasResult
=
false
;
11
17
public
function
setResult
(
$result
): self
18
{
19
$this->
hasResult
=
true
;
20
return
parent::setData([
'RESULT'
=>
$result
]);
21
}
22
27
public
function
getResult
()
28
{
29
return
parent::getData()[
'RESULT'
] ??
null
;
30
}
31
36
public
function
hasResult
(): bool
37
{
38
return
$this->
isSuccess
() && $this->hasResult;
39
}
40
41
public
static
function
merge
(
Result
...$results):
Result
42
{
43
$mergedResult =
new
Result
();
44
$dataResults = [];
45
46
foreach
($results as
$result
)
47
{
48
if
(!
$result
->isSuccess())
49
{
50
$mergedResult->addErrors(
$result
->getErrors());
51
}
52
elseif
(
$result
->hasResult)
53
{
54
$dataResults[] =
$result
->getResult();
55
}
56
}
57
58
if
(!empty($dataResults))
59
{
60
$mergedResult->setResult(array_merge(...$dataResults));
61
}
62
63
return
$mergedResult;
64
}
65
}
Bitrix\Im\V2\Result\setResult
setResult($result)
Определения
Result.php:17
Bitrix\Im\V2\Result\$hasResult
bool $hasResult
Определения
Result.php:10
Bitrix\Im\V2\Result\merge
static merge(Result ... $results)
Определения
Result.php:41
Bitrix\Im\V2\Result\getResult
getResult()
Определения
Result.php:27
Bitrix\Im\V2\Result\hasResult
hasResult()
Определения
Result.php:36
Bitrix\Main\DB\Result
Определения
result.php:20
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
Bitrix\Main\ORM\Data\Result\isSuccess
isSuccess($internalCall=false)
Определения
result.php:47
$result
$result
Определения
get_property_values.php:14
elseif
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения
prolog_main_admin.php:393
bitrix
modules
im
lib
V2
Result.php
Создано системой
1.14.0