irfaardy /
php-hari-libur
| 1 | <?php |
||
| 2 | /* |
||
| 3 | Author: Irfa Ardiansyah <[email protected]> |
||
| 4 | */ |
||
| 5 | namespace Irfa\HariLibur\Core; |
||
| 6 | |||
| 7 | |||
| 8 | class ConfigLoader |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Method ini berfungsi memuat file konfigurasi region. |
||
| 12 | * |
||
| 13 | * @return string |
||
| 14 | */ |
||
| 15 | public function region() |
||
| 16 | { |
||
| 17 | if(file_exists(__DIR__.'../../../../../../config/irfa/hari_libur.php') && function_exists('app')){ |
||
| 18 | |||
| 19 | return strtoupper(config('irfa.hari_libur.region')); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 20 | |||
| 21 | } else { |
||
| 22 | |||
| 23 | require(__DIR__.'../../../config/hari_libur.php'); |
||
| 24 | |||
| 25 | return strtoupper($conf['region']); |
||
|
0 ignored issues
–
show
Comprehensibility
Best Practice
introduced
by
|
|||
| 26 | } |
||
| 27 | } |
||
| 28 | } |
||
| 29 |