1 | <?php declare(strict_types=1); |
||
13 | class DependenciesResolver implements DependenciesResolverInterface |
||
14 | { |
||
15 | /** |
||
16 | * Constructors dependencies |
||
17 | * @var array |
||
18 | */ |
||
19 | protected $constructors = []; |
||
20 | |||
21 | /** |
||
22 | * Callable dependencies |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $callables = []; |
||
26 | |||
27 | /** |
||
28 | * {@inheritDoc} |
||
29 | */ |
||
30 | 26 | public function resolveConstructorDependencies(string $className, ?string $constructMethod = null): array |
|
48 | |||
49 | |||
50 | /** |
||
51 | * {@inheritDoc} |
||
52 | */ |
||
53 | 14 | public function resolveCallableDependencies(callable $callable): array |
|
68 | |||
69 | /** |
||
70 | * Fetch dependencies from function by reflection |
||
71 | * |
||
72 | * @param ReflectionFunctionAbstract $reflection |
||
73 | * @return Dependency[] Dependencies |
||
74 | * @throws ReflectionException |
||
75 | */ |
||
76 | 35 | protected function resolveFunctionDependencies(ReflectionFunctionAbstract $reflection): array |
|
94 | |||
95 | /** |
||
96 | * @param ReflectionParameter $parameter |
||
97 | * @return array |
||
98 | * @throws ReflectionException |
||
99 | */ |
||
100 | 33 | protected function getTypeValueByParameter(ReflectionParameter $parameter): array |
|
116 | } |
||
117 |