1C-Bitrix
25.700.0
Загрузка...
Поиск...
Не найдено
controllerbinder.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Main\Engine\AutoWire;
4
5
use Bitrix\Main\Engine\Controller;
6
use Bitrix\Main\Result;
7
8
final
class
ControllerBinder
extends
Binder
9
{
11
private
$controller;
12
13
public
function
getController
():
Controller
14
{
15
return
$this->controller;
16
}
17
18
public
function
setController
(
Controller
$controller):
ControllerBinder
19
{
20
$this->controller = $controller;
21
22
return
$this;
23
}
24
25
protected
function
constructValue
(\ReflectionParameter $parameter,
Parameter
$autoWireParameter,
Result
$captureResult):
Result
26
{
27
$result
=
new
Result
();
28
29
$controller = $this->
getController
();
30
31
$errorsBefore = $controller->getErrors();
32
$constructedValue = $autoWireParameter->
constructValue
($parameter, $captureResult, $controller);
33
$errorsAfter = $controller->getErrors();
34
35
$newErrors = array_diff($errorsAfter, $errorsBefore);
36
37
$result
->setData([
38
'value'
=> $constructedValue,
39
]);
40
41
if
($newErrors)
42
{
43
$result
->addErrors($newErrors);
44
}
45
46
return
$result
;
47
}
48
}
Bitrix\Main\Engine\AutoWire\Binder
Определения
binder.php:12
Bitrix\Main\Engine\AutoWire\ControllerBinder
Определения
controllerbinder.php:9
Bitrix\Main\Engine\AutoWire\ControllerBinder\setController
setController(Controller $controller)
Определения
controllerbinder.php:18
Bitrix\Main\Engine\AutoWire\ControllerBinder\getController
getController()
Определения
controllerbinder.php:13
Bitrix\Main\Engine\AutoWire\ControllerBinder\constructValue
constructValue(\ReflectionParameter $parameter, Parameter $autoWireParameter, Result $captureResult)
Определения
controllerbinder.php:25
Bitrix\Main\Engine\AutoWire\Parameter
Определения
parameter.php:9
Bitrix\Main\Engine\AutoWire\Parameter\constructValue
constructValue(\ReflectionParameter $parameter, Result $captureResult, $newThis=null)
Определения
parameter.php:47
Bitrix\Main\ORM\Data\Result
Определения
result.php:16
$result
$result
Определения
get_property_values.php:14
Bitrix\Main\Controller
Определения
agreement.php:2
bitrix
modules
main
lib
engine
autowire
controllerbinder.php
Создано системой
1.14.0