1 | <?php |
||
12 | class ProvidersFactory |
||
13 | { |
||
14 | /** |
||
15 | * @var \Closure[] |
||
16 | */ |
||
17 | protected static $resolvers; |
||
18 | |||
19 | /** |
||
20 | * Extend resolver to support customers providers. |
||
21 | * |
||
22 | * @param string $name |
||
23 | * @param \Closure $resolver |
||
24 | */ |
||
25 | 1 | public static function extend($name, $resolver) |
|
29 | |||
30 | /** |
||
31 | * Resolve provider from it's name. |
||
32 | * |
||
33 | * @param string $name |
||
34 | * @param array $options |
||
35 | * @return AbstractProvider |
||
36 | */ |
||
37 | 18 | public function make($name, array $options = []) |
|
61 | |||
62 | /** |
||
63 | * Try to resolve extra providers. |
||
64 | * |
||
65 | * @param string $name |
||
66 | * @param array $options |
||
67 | * @return AbstractProvider|null |
||
68 | */ |
||
69 | 18 | protected function resolveExtends($name, array $options) |
|
77 | } |
||
78 |