Total Complexity | 6 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
7 | class BaseGenerator |
||
8 | { |
||
9 | protected $module; |
||
10 | |||
11 | public function getModule() |
||
12 | { |
||
13 | return $this->module; |
||
14 | } |
||
15 | |||
16 | public function setModule(Module $module) |
||
19 | } |
||
20 | |||
21 | public function getStub($type) |
||
22 | { |
||
23 | return file_get_contents(__DIR__ . "/../resources/stubs/" . $type . ".stub"); |
||
24 | } |
||
25 | |||
26 | public function buildTemplate($stub, $variables) |
||
27 | { |
||
28 | return str_replace(array_keys($variables), array_values($variables), $this->getStub($stub)); |
||
29 | } |
||
30 | |||
31 | public function getTabs($number) |
||
38 | } |
||
39 | } |
||
40 |