@@ 259-272 (lines=14) @@ | ||
256 | * |
|
257 | * @return boolean |
|
258 | */ |
|
259 | public function installResponseHelper() |
|
260 | { |
|
261 | $createFolder = $this->getHelpersPath(); |
|
262 | if (!file_exists($createFolder)) { |
|
263 | mkdir($createFolder); |
|
264 | } |
|
265 | ||
266 | $fileContent = file_get_contents(__DIR__ . "..".'/Stubs/Helpers/ResponseHelper.stub'); |
|
267 | ||
268 | $filePath = $createFolder.DIRECTORY_SEPARATOR."ResponseHelper.php"; |
|
269 | file_put_contents($filePath, $fileContent); |
|
270 | ||
271 | return true; |
|
272 | } |
|
273 | ||
274 | /** |
|
275 | * Install AppBaseController Helper. |
|
@@ 351-366 (lines=16) @@ | ||
348 | * |
|
349 | * @return boolean |
|
350 | */ |
|
351 | public function installBaseRepository() |
|
352 | { |
|
353 | ||
354 | $createFolder = $this->getRepositoriesPath(); |
|
355 | if (!file_exists($createFolder)) { |
|
356 | mkdir($createFolder); |
|
357 | } |
|
358 | ||
359 | $fileContent = file_get_contents(__DIR__ . "..".'/Stubs/Repositories/BaseRepository.stub'); |
|
360 | ||
361 | ||
362 | $filePath = $createFolder.DIRECTORY_SEPARATOR."BaseRepository.php"; |
|
363 | file_put_contents($filePath, $fileContent); |
|
364 | ||
365 | return true; |
|
366 | } |
|
367 | ||
368 | /** |
|
369 | * Install CRUDRepository Helper. |