1 | <?php |
||
20 | final class SculpinCompilerExtension extends CompilerExtension |
||
21 | { |
||
22 | use TypeAndCollectorTrait; |
||
23 | |||
24 | /** |
||
25 | * @var string[] |
||
26 | */ |
||
27 | private $defaultConfig = [ |
||
28 | 'sourceDir' => '%appDir%/../../../source', |
||
29 | 'outputDir' => '%appDir%/../../../output', |
||
30 | 'postRoute' => 'blog/:year/:month/:day/:filename', |
||
31 | ]; |
||
32 | |||
33 | 4 | public function loadConfiguration() |
|
39 | |||
40 | 3 | public function beforeCompile() |
|
45 | |||
46 | 4 | private function validateAndReturnConfig(array $defaultConfig) : array |
|
56 | |||
57 | 4 | private function loadConfigToParameters(array $config) |
|
61 | |||
62 | 4 | private function loadServicesFromConfig() |
|
69 | |||
70 | 4 | private function ensureDirectoryExists(string $sourceDir) |
|
71 | { |
||
72 | 4 | if (!is_dir($sourceDir)) { |
|
73 | throw new \Exception( |
||
74 | sprintf('Source directory "%s" was not found.', $sourceDir) |
||
75 | ); |
||
76 | } |
||
77 | 4 | } |
|
78 | |||
79 | 4 | private function expandParameter(string $value) : string |
|
84 | } |
||
85 |
This method has been deprecated.