1 | <?php |
||
23 | trait AutowiringTrait |
||
24 | { |
||
25 | use ClassmapTrait; |
||
26 | use ParameterTrait; |
||
27 | |||
28 | /** |
||
29 | * @var bool |
||
30 | */ |
||
31 | protected $autoLoad = FALSE; |
||
32 | |||
33 | /** |
||
34 | * match provided arguments with defined parameters |
||
35 | * |
||
36 | * @param array $providedArguments |
||
37 | * @param \ReflectionParameter[] $reflectionParameters |
||
38 | * @return array |
||
39 | * @throws UnresolvedClassException |
||
40 | */ |
||
41 | protected function matchArguments( |
||
55 | |||
56 | /** |
||
57 | * Try best to guess parameter and argument are the same type |
||
58 | * |
||
59 | * @param null|\ReflectionClass $class |
||
60 | * @param array $arguments |
||
61 | * @return bool |
||
62 | */ |
||
63 | protected function isTypeMatched($class, array $arguments): bool |
||
73 | |||
74 | /** |
||
75 | * Is $param required and is a class/interface |
||
76 | * |
||
77 | * @param \ReflectionParameter $param |
||
78 | * @param array $arguments |
||
79 | * @return bool |
||
80 | */ |
||
81 | protected function isRequiredClass(\ReflectionParameter $param, array $arguments): bool |
||
90 | |||
91 | /** |
||
92 | * @param string $classname |
||
93 | * @return object |
||
94 | * @throws UnresolvedClassException |
||
95 | */ |
||
96 | protected function getObjectByClass(string $classname): object |
||
111 | } |