1 | <?php |
||
13 | class Render |
||
14 | { |
||
15 | /** |
||
16 | * @var TwigCreator |
||
17 | */ |
||
18 | private $twigCreator; |
||
19 | /** |
||
20 | * @var ConfigDAO |
||
21 | */ |
||
22 | private $configDAO; |
||
23 | |||
24 | /** |
||
25 | * Construct. |
||
26 | * |
||
27 | * @param TwigCreator $twig |
||
28 | * @param ConfigDAO $configDAO |
||
29 | */ |
||
30 | 4 | public function __construct(TwigCreator $twig, ConfigDAO $configDAO) |
|
35 | |||
36 | /** |
||
37 | * @param Root $root |
||
38 | * @param string $target |
||
39 | * @param string $templatePath |
||
40 | */ |
||
41 | public function render(Root $root, $target, $templatePath = false) |
||
62 | |||
63 | /** |
||
64 | * @param string $templatePath |
||
65 | * @param string $target |
||
66 | */ |
||
67 | private function copyAssets($templatePath, $target) |
||
79 | |||
80 | /** |
||
81 | * @param string $path |
||
82 | */ |
||
83 | private function createDirIfNotExist($path) |
||
89 | |||
90 | /** |
||
91 | * @param string $base |
||
92 | * @param string $actual |
||
93 | * |
||
94 | * @return string |
||
95 | */ |
||
96 | private function assetsPath($base, $actual) |
||
100 | |||
101 | /** |
||
102 | * @param File $file |
||
103 | * @param \Twig_Environment $twig |
||
104 | * @param string $target |
||
105 | * @param string $basePath |
||
106 | */ |
||
107 | private function renderFile(File $file, \Twig_Environment $twig, $target, $basePath) |
||
124 | |||
125 | /** |
||
126 | * @param Directory $directory |
||
127 | * @param Root $root |
||
128 | * @param \Twig_Environment $twig |
||
129 | * @param string $target |
||
130 | */ |
||
131 | private function renderDirectory(Directory $directory, Root $root, \Twig_Environment $twig, $target) |
||
149 | } |
||
150 |