1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace WebServCo\Framework\Helpers; |
||
6 | |||
7 | use WebServCo\Framework\Libraries\Config; |
||
8 | |||
9 | final class ConfigLibraryHelper extends AbstractLibraryHelper |
||
10 | { |
||
11 | private static ?Config $object = null; |
||
12 | |||
13 | /** |
||
14 | * @return array<mixed> |
||
15 | */ |
||
16 | public static function getSettings(string $name): array |
||
17 | { |
||
18 | return self::library()->load($name, \WebServCo\Framework\Environment\Config::string('APP_PATH_PROJECT')); |
||
19 | } |
||
20 | |||
21 | public static function library(): Config |
||
22 | { |
||
23 | if (!self::$object instanceof Config) { |
||
24 | self::$object = new Config(); |
||
25 | } |
||
26 | return self::$object; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
![]() |
|||
27 | } |
||
28 | } |
||
29 |