1 | <?php |
||
5 | trait Singleton |
||
6 | { |
||
7 | protected function __construct() |
||
10 | |||
11 | /** |
||
12 | * @throws SingletonException |
||
13 | */ |
||
14 | final public function __clone() |
||
18 | |||
19 | /** |
||
20 | * @throws SingletonException |
||
21 | */ |
||
22 | final public function __sleep() |
||
26 | |||
27 | /** |
||
28 | * @throws SingletonException |
||
29 | */ |
||
30 | final public function __wakeup() |
||
34 | |||
35 | /** |
||
36 | * @return static |
||
37 | */ |
||
38 | public static function getInstance() |
||
49 | |||
50 | } |
||
51 |