1 | <?php |
||
18 | abstract class Facade |
||
19 | { |
||
20 | /** |
||
21 | * Facaded component property accessors. |
||
22 | * |
||
23 | * @var array |
||
24 | */ |
||
25 | private static $_accessors = []; |
||
26 | |||
27 | /** |
||
28 | * The facaded application. |
||
29 | * |
||
30 | * @var Application |
||
31 | */ |
||
32 | private static $_app; |
||
33 | |||
34 | /** |
||
35 | * Facaded components. |
||
36 | * |
||
37 | * @var object[] |
||
38 | */ |
||
39 | private static $_components = []; |
||
40 | |||
41 | /** |
||
42 | * Clears a resolved facade component. |
||
43 | * |
||
44 | * @param string $id |
||
45 | */ |
||
46 | public static function clearResolvedFacadeComponent($id) |
||
51 | |||
52 | /** |
||
53 | * Clears all resolved facade components. |
||
54 | */ |
||
55 | public static function clearResolvedFacadeComponents() |
||
60 | |||
61 | /** |
||
62 | * Returns a component ID being facaded. |
||
63 | * |
||
64 | * @return string |
||
65 | */ |
||
66 | public static function getFacadeComponentId() |
||
70 | |||
71 | /** |
||
72 | * Returns a component being facaded. |
||
73 | * |
||
74 | * @return object |
||
75 | */ |
||
76 | public static function getFacadeComponent() |
||
84 | |||
85 | /** |
||
86 | * Returns the facaded application. |
||
87 | * |
||
88 | * @return Application |
||
89 | */ |
||
90 | public static function getFacadeApplication() |
||
97 | |||
98 | /** |
||
99 | * Sets the facaded application. |
||
100 | * |
||
101 | * @param Application $value |
||
102 | */ |
||
103 | public static function setFacadeApplication(Application $value) |
||
108 | |||
109 | /** |
||
110 | * Redirects static calls to component instance calls. |
||
111 | * |
||
112 | * @inheritDoc |
||
113 | */ |
||
114 | public static function __callStatic($name, $arguments) |
||
141 | |||
142 | /** |
||
143 | * @inheritDoc |
||
144 | */ |
||
145 | private function __construct() |
||
147 | |||
148 | /** |
||
149 | * @inheritDoc |
||
150 | */ |
||
151 | private function __wakeup() |
||
153 | |||
154 | /** |
||
155 | * @inheritDoc |
||
156 | */ |
||
157 | private function __clone() |
||
159 | } |
||
160 |