1 | <?php |
||
23 | final class RenderableFilesProcessor |
||
24 | { |
||
25 | /** |
||
26 | * @var FileFactory |
||
27 | */ |
||
28 | private $fileFactory; |
||
29 | |||
30 | /** |
||
31 | * @var RouteDecorator |
||
32 | */ |
||
33 | private $routeDecorator; |
||
34 | |||
35 | /** |
||
36 | * @var ConfigurationDecorator |
||
37 | */ |
||
38 | private $configurationDecorator; |
||
39 | |||
40 | /** |
||
41 | * @var MarkdownDecorator |
||
42 | */ |
||
43 | private $markdownDecorator; |
||
44 | /** |
||
45 | * @var LatteDecorator |
||
46 | */ |
||
47 | private $latteDecorator; |
||
48 | |||
49 | /** |
||
50 | * @var FileSystemWriter |
||
51 | */ |
||
52 | private $fileSystemWriter; |
||
53 | /** |
||
54 | * @var Configuration |
||
55 | */ |
||
56 | private $configuration; |
||
57 | |||
58 | public function __construct( |
||
75 | |||
76 | /** |
||
77 | * @param SplFileInfo[] $fileInfos |
||
78 | */ |
||
79 | public function processFiles(array $fileInfos) |
||
95 | |||
96 | /** |
||
97 | * @param array $fileInfos |
||
98 | * |
||
99 | * @return array |
||
100 | */ |
||
101 | private function createFileObjectsFromFileInfos(array $fileInfos):array |
||
110 | |||
111 | /** |
||
112 | * @param File[] $files |
||
113 | */ |
||
114 | private function setPostsToConfiguration(array $files) |
||
120 | |||
121 | /** |
||
122 | * @param File[] $files |
||
123 | */ |
||
124 | private function setRoutesToFiles(array $files) |
||
130 | |||
131 | /** |
||
132 | * @param File[] $files |
||
133 | */ |
||
134 | private function setFileConfigurationToFile(array $files) |
||
140 | |||
141 | /** |
||
142 | * @param File[] $files |
||
143 | */ |
||
144 | private function formatFileContentFromMarkdownToHtml(array $files) |
||
150 | |||
151 | /** |
||
152 | * @param File[] $files |
||
153 | */ |
||
154 | private function formatFileContentFromLatteToHtml(array $files) |
||
160 | } |
||
161 |