1 | <?php |
||
20 | class FacadeService implements SingletonInterface |
||
21 | { |
||
22 | /** |
||
23 | * @var FacadeService |
||
24 | */ |
||
25 | private static $instance; |
||
26 | |||
27 | /** |
||
28 | * @var array |
||
29 | */ |
||
30 | protected $facadeInstances = []; |
||
31 | |||
32 | /** |
||
33 | * @return FacadeService |
||
34 | */ |
||
35 | public static function get() |
||
43 | |||
44 | /** |
||
45 | * @param string $className |
||
46 | * @param bool $useObjectManager |
||
47 | * @return object |
||
48 | */ |
||
49 | public function getInstance($className, $useObjectManager = false) |
||
58 | |||
59 | /** |
||
60 | * Used in unit tests. |
||
61 | */ |
||
62 | public function reset() |
||
70 | |||
71 | /** |
||
72 | * Used in unit tests. |
||
73 | * |
||
74 | * @param string $className |
||
75 | * @param object $instance |
||
76 | */ |
||
77 | public function forceInstance($className, $instance) |
||
81 | } |
||
82 |