| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | public function generate() |
||
| 15 | { |
||
| 16 | $controllerTemplate = $this->buildTemplate(self::$template, [ |
||
| 17 | '{{namespace}}' => self::$namespace, |
||
| 18 | '{{modelName}}' => $this->module->getModelName(), |
||
| 19 | '{{moduleName}}' => $this->module->getModuleName(), |
||
| 20 | '{{modelNameSingularLowerCase}}' => strtolower($this->module->getModelName()) |
||
| 21 | ]); |
||
| 22 | |||
| 23 | $fullFilePath = $this->getPath(self::$destination."/").$this->module->getModelName()."Controller".".php"; |
||
| 24 | file_put_contents($fullFilePath, $controllerTemplate); |
||
| 25 | return $fullFilePath; |
||
| 26 | } |
||
| 28 |