Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
closureaction.php
1<?php
2
3namespace Bitrix\Main\Engine;
4
5
6final class ClosureAction extends Action
7{
11 protected $callable;
12
22 {
23 $this->callable = $callable;
24 parent::__construct($name, $controller, $config);
25 }
26
27 protected function buildBinder()
28 {
29 if ($this->binder === null)
30 {
31 $controller = $this->getController();
32 $this->binder = AutoWire\ControllerBinder::buildForFunction($this->callable)
33 ->setController($controller)
34 ->setSourcesParametersToMap($controller->getSourceParametersList())
35 ->setAutoWiredParameters(
36 array_filter(array_merge(
37 [$controller->getPrimaryAutoWiredParameter()],
38 $controller->getAutoWiredParameters()
39 ))
40 )
41 ;
42 }
43
44 return $this;
45 }
46}
__construct($name, Controller $controller, $callable, $config=array())