1 | <?php |
||
19 | abstract class Facade |
||
20 | { |
||
21 | /** |
||
22 | * @var Api[] |
||
23 | */ |
||
24 | protected static $api = []; |
||
25 | |||
26 | /** |
||
27 | * @var Model |
||
28 | */ |
||
29 | protected $domain; |
||
30 | |||
31 | /** |
||
32 | * @param array $data |
||
33 | */ |
||
34 | 55 | public function __construct(array $data = []) |
|
40 | |||
41 | /** |
||
42 | * @param array $data |
||
43 | * |
||
44 | * @return static |
||
45 | */ |
||
46 | 9 | public static function make(array $data = []) |
|
50 | |||
51 | /** |
||
52 | * @param Api $api |
||
53 | */ |
||
54 | 62 | public static function setApi(Api $api) |
|
58 | |||
59 | /** |
||
60 | * @return Api |
||
61 | */ |
||
62 | 62 | private static function getApiForClass() |
|
66 | |||
67 | /** |
||
68 | * @param $method |
||
69 | */ |
||
70 | 62 | private static function checkApiMethodExists($method) |
|
78 | |||
79 | /** |
||
80 | * @param string $method |
||
81 | * @param array $args |
||
82 | * |
||
83 | * @return mixed|self |
||
84 | */ |
||
85 | 43 | public static function __callStatic($method, $args) |
|
91 | |||
92 | /** |
||
93 | * @param $method |
||
94 | * @param $args |
||
95 | * |
||
96 | * @return mixed |
||
97 | */ |
||
98 | 33 | public function __call($method, $args) |
|
108 | |||
109 | 39 | public function __get($name) |
|
124 | |||
125 | 23 | public function __set($name, $value) |
|
129 | } |
||
130 |