@@ 91-103 (lines=13) @@ | ||
88 | $this->generateTransformer(); |
|
89 | } |
|
90 | ||
91 | public function generateApiController() |
|
92 | { |
|
93 | $stub = is_lumen() ? $this->stubs['api.controller.lumen'] : $this->stubs['api.controller.laravel']; |
|
94 | $stub = $this->getStub($stub); |
|
95 | ||
96 | $controllerGenerator = new ControllerGenerator([ 'name' => 'Base' ]); |
|
97 | $namespace = $controllerGenerator->getNamespace(); |
|
98 | ||
99 | $path = $controllerGenerator->getBasePath().'/'.$controllerGenerator->getConfigGeneratorClassPath($controllerGenerator->getPathConfigNode(), |
|
100 | true).'/BaseController.php'; |
|
101 | ||
102 | $this->generateFile($path, $stub, $namespace); |
|
103 | } |
|
104 | ||
105 | public function generateHttpController() |
|
106 | { |
|
@@ 137-147 (lines=11) @@ | ||
134 | $this->generateFile($path, $stub, $namespace); |
|
135 | } |
|
136 | ||
137 | public function generateRepositoriesEloquent() |
|
138 | { |
|
139 | $stub = $this->stubs['repositories.eloquent']; |
|
140 | $stub = $this->getStub($stub); |
|
141 | $generator = new RepositoryEloquentGenerator([ 'name' => 'Base' ]); |
|
142 | $namespace = $generator->getNamespace(); |
|
143 | $path = $generator->getBasePath().'/'.$generator->getConfigGeneratorClassPath($generator->getPathConfigNode(), |
|
144 | true).'/BaseRepository.php'; |
|
145 | ||
146 | $this->generateFile($path, $stub, $namespace); |
|
147 | } |
|
148 | ||
149 | public function generateRepositoriesInterfaces() |
|
150 | { |
|
@@ 149-159 (lines=11) @@ | ||
146 | $this->generateFile($path, $stub, $namespace); |
|
147 | } |
|
148 | ||
149 | public function generateRepositoriesInterfaces() |
|
150 | { |
|
151 | $stub = $this->stubs['repositories.interfaces']; |
|
152 | $stub = $this->getStub($stub); |
|
153 | $generator = new RepositoryInterfaceGenerator([ 'name' => 'Base' ]); |
|
154 | $namespace = $generator->getNamespace(); |
|
155 | $path = $generator->getBasePath().'/'.$generator->getConfigGeneratorClassPath($generator->getPathConfigNode(), |
|
156 | true).'/BaseRepositoryInterface.php'; |
|
157 | ||
158 | $this->generateFile($path, $stub, $namespace); |
|
159 | } |
|
160 | ||
161 | public function generateTransformer() |
|
162 | { |