1 | <?php |
||
38 | final class RenderHandler |
||
|
|||
39 | { |
||
40 | /** @var TemplateFactory */ |
||
41 | private $templateFactory; |
||
42 | |||
43 | /** @var CommandBus */ |
||
44 | private $commandBus; |
||
45 | |||
46 | /** @var FileSystemFactory */ |
||
47 | private $filesystemFactory; |
||
48 | |||
49 | /** @var EmitterInterface */ |
||
50 | private $emitter; |
||
51 | |||
52 | /** @var Assets */ |
||
53 | private $assets; |
||
54 | |||
55 | /** |
||
56 | * RenderHandler constructor. |
||
57 | * |
||
58 | * @param TemplateFactory $templateFactory |
||
59 | * @param CommandBus $commandBus |
||
60 | * @param FileSystemFactory $filesystemFactory |
||
61 | * @param EmitterInterface $emitter |
||
62 | * @param Assets $assets |
||
63 | */ |
||
64 | public function __construct( |
||
77 | |||
78 | public function __invoke(Render $command) |
||
93 | |||
94 | /** |
||
95 | * @param array $templates |
||
96 | * @param RenderContext $renderContext |
||
97 | */ |
||
98 | private function renderTemplates(array $templates, RenderContext $renderContext) |
||
104 | |||
105 | /** |
||
106 | * @param array $templateDefinition |
||
107 | * @param RenderContext $renderContext |
||
108 | */ |
||
109 | private function renderTemplate(array $templateDefinition, RenderContext $renderContext) |
||
115 | |||
116 | /** |
||
117 | * @param array $templateDefinition |
||
118 | * @param RenderContext $renderContext |
||
119 | * |
||
120 | * @return Template |
||
121 | */ |
||
122 | private function getTemplateFromDefinition(array $templateDefinition, RenderContext $renderContext) |
||
149 | |||
150 | /** |
||
151 | * @param Action[] $actions |
||
152 | */ |
||
153 | private function renderActions(array $actions) |
||
159 | |||
160 | /** |
||
161 | * @param Action $action |
||
162 | */ |
||
163 | private function renderAction(Action $action) |
||
168 | |||
169 | /** |
||
170 | * @param Documentation $documentation |
||
171 | * |
||
172 | * @return ReadModels |
||
173 | */ |
||
174 | private function createReadModels(Documentation $documentation) |
||
179 | |||
180 | /** |
||
181 | * @param Filesystem $destination |
||
182 | * |
||
183 | * @return FlySystemArtefacts |
||
184 | */ |
||
185 | private function createArtefactsLocation(Filesystem $destination) |
||
189 | } |
||
190 |