1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace WebServCo\Framework\Helpers; |
||
6 | |||
7 | use WebServCo\Framework\Libraries\Session; |
||
8 | |||
9 | final class SessionLibraryHelper extends AbstractLibraryHelper |
||
10 | { |
||
11 | private static ?Session $object = null; |
||
12 | |||
13 | public static function library(): Session |
||
14 | { |
||
15 | if (!self::$object instanceof Session) { |
||
16 | $settings = ConfigLibraryHelper::getSettings('Session'); |
||
17 | self::$object = new Session($settings); |
||
18 | } |
||
19 | return self::$object; |
||
0 ignored issues
–
show
Bug
Best Practice
introduced
by
Loading history...
|
|||
20 | } |
||
21 | } |
||
22 |