1 | <?php |
||
11 | class UnicomponentServiceManager |
||
12 | { |
||
13 | /** |
||
14 | * @var array |
||
15 | */ |
||
16 | private $servicesComponents = []; |
||
17 | |||
18 | /** |
||
19 | * @var mixed |
||
20 | */ |
||
21 | private $config; |
||
22 | |||
23 | /** |
||
24 | * Construct. |
||
25 | * |
||
26 | * @author reallyli <[email protected]> |
||
27 | * @since 18/10/11 |
||
28 | * @param mixed $config |
||
29 | * @return void |
||
|
|||
30 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
31 | */ |
||
32 | public function __construct($config) |
||
37 | |||
38 | /** |
||
39 | * Method description:registerComponent. |
||
40 | * |
||
41 | * @author reallyli <[email protected]> |
||
42 | * @since 18/10/11 |
||
43 | * @param UnicomponentServiceInterface $service |
||
44 | * @return mixed |
||
45 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
46 | */ |
||
47 | public function registerComponent(UnicomponentServiceInterface $service) |
||
53 | |||
54 | /** |
||
55 | * Method description:registerDefaultComponent. |
||
56 | * |
||
57 | * @author reallyli <[email protected]> |
||
58 | * @since 18/10/11 |
||
59 | * @return void |
||
60 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
61 | */ |
||
62 | public function registerDefaultComponent() |
||
72 | |||
73 | /** |
||
74 | * Method description:setServiceInstance. |
||
75 | * |
||
76 | * @author reallyli <[email protected]> |
||
77 | * @since 18/10/11 |
||
78 | * @param $alias |
||
79 | * @param $instance |
||
80 | * @return mixed |
||
81 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
82 | */ |
||
83 | protected function setServiceComponents($alias, $instance) |
||
91 | |||
92 | /** |
||
93 | * Method description:getServices. |
||
94 | * |
||
95 | * @author reallyli <[email protected]> |
||
96 | * @since 18/10/11 |
||
97 | * @return mixed |
||
98 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
99 | */ |
||
100 | public function getServiceComponents() |
||
104 | |||
105 | /** |
||
106 | * Method description:getServiceComponent. |
||
107 | * |
||
108 | * @author reallyli <[email protected]> |
||
109 | * @since 18/10/11 |
||
110 | * @param $serviceAlias |
||
111 | * @return mixed |
||
112 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
113 | */ |
||
114 | public function getServiceComponent($serviceAlias) |
||
118 | |||
119 | /** |
||
120 | * Method description:__call. |
||
121 | * |
||
122 | * @author reallyli <[email protected]> |
||
123 | * @since 18/10/11 |
||
124 | * @param string $method |
||
125 | * @param array $parameters |
||
126 | * @return mixed |
||
127 | * 返回值类型:string,array,object,mixed(多种,不确定的),void(无返回值) |
||
128 | */ |
||
129 | public function __call(string $method, array $parameters) |
||
133 | |||
134 | /** |
||
135 | * Method description:__get. |
||
136 | * |
||
137 | * @author reallyli <[email protected]> |
||
138 | * @since 2018/11/20 |
||
139 | * @param string $componentName |
||
140 | * @return mixed |
||
141 | */ |
||
142 | public function __get(string $componentName) |
||
146 | } |
||
147 |
Adding a
@return
annotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.