1 | <?php |
||
10 | class ReflectionStrategy implements CreationStrategyInterface |
||
11 | { |
||
12 | /** |
||
13 | * @var \ReflectionClass |
||
14 | */ |
||
15 | private $handlerReflectionClass; |
||
16 | |||
17 | /** |
||
18 | * Initializes a new ReflectionStrategy. |
||
19 | * |
||
20 | * @param string $class |
||
21 | */ |
||
22 | 10 | public function __construct(string $class) |
|
26 | |||
27 | /** |
||
28 | * Returns required parameter names as array. |
||
29 | * |
||
30 | * @return string[] |
||
31 | */ |
||
32 | 2 | public function getRequiredParameters(): array |
|
54 | |||
55 | /** |
||
56 | * @param array $config |
||
57 | * |
||
58 | * @return array |
||
59 | * |
||
60 | * @throws \yii\di\NotInstantiableException |
||
61 | * @throws \yii\base\InvalidConfigException |
||
62 | * @throws \InvalidArgumentException |
||
63 | */ |
||
64 | 8 | public function getConstructorParameters(array $config): array |
|
77 | |||
78 | /** |
||
79 | * Returns the value for the constructorParameter from given configuration array. |
||
80 | * |
||
81 | * @param ReflectionParameter $constructorParameter |
||
82 | * @param array $config |
||
83 | * |
||
84 | * @return mixed |
||
85 | * |
||
86 | * @throws \yii\di\NotInstantiableException |
||
87 | * @throws \yii\base\InvalidConfigException |
||
88 | * @throws \InvalidArgumentException |
||
89 | */ |
||
90 | 7 | private function resolveConstructorParameterValue(ReflectionParameter $constructorParameter, array $config) |
|
110 | } |
||
111 |