1 | <?php |
||
13 | abstract class AbstractParse implements Command |
||
14 | { |
||
15 | protected $outputDirectory; |
||
16 | protected $configurationFile; |
||
17 | protected $pageParser; |
||
18 | protected $pageRenderer; |
||
19 | |||
20 | 11 | public function __construct( |
|
21 | string $outputDirectory, |
||
22 | string $configurationFile, |
||
23 | PageParser $pageParser, |
||
24 | PageRenderer $pageRenderer |
||
25 | ) { |
||
26 | 11 | $this->outputDirectory = rtrim($outputDirectory, '/'); |
|
27 | 11 | $this->configurationFile = $configurationFile; |
|
28 | 11 | $this->pageParser = $pageParser; |
|
29 | 11 | $this->pageRenderer = $pageRenderer; |
|
30 | 11 | } |
|
31 | |||
32 | /** |
||
33 | * @param string $outputDirectory |
||
34 | * @param string $configurationFile |
||
35 | * @param \Stitcher\Page\PageParser $pageParser |
||
36 | * @param \Stitcher\Page\PageRenderer $pageRenderer |
||
37 | * |
||
38 | * @return static |
||
39 | */ |
||
40 | 9 | public static function make( |
|
48 | |||
49 | 10 | protected function parsePageConfiguration($config): array |
|
61 | |||
62 | 10 | protected function renderPages($pages): void |
|
78 | } |
||
79 |