1 | <?php |
||
12 | class ReflectionStrategy implements CreationStrategyInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var \ReflectionClass |
||
16 | */ |
||
17 | private $handlerReflectionClass; |
||
18 | |||
19 | /** |
||
20 | * Initializes a new ReflectionStrategy. |
||
21 | * |
||
22 | * @param string $class |
||
23 | */ |
||
24 | 12 | public function __construct(string $class) |
|
25 | { |
||
26 | 12 | $this->handlerReflectionClass = new \ReflectionClass($class); |
|
27 | 12 | } |
|
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | 2 | public function getRequiredParameters(): array |
|
54 | |||
55 | /** |
||
56 | * {@inheritdoc} |
||
57 | */ |
||
58 | 8 | public function getConstructorParameters(array $config): array |
|
71 | |||
72 | /** |
||
73 | * {@inheritdoc} |
||
74 | */ |
||
75 | public function getConfigurationCallable(array $config): callable |
||
79 | |||
80 | /** |
||
81 | * Returns the value for the constructorParameter from given configuration array. |
||
82 | * |
||
83 | * @param ReflectionParameter $constructorParameter |
||
84 | * @param array $config |
||
85 | * |
||
86 | * @return mixed |
||
87 | * |
||
88 | * @throws \yii\di\NotInstantiableException |
||
89 | * @throws \yii\base\InvalidConfigException |
||
90 | * @throws \InvalidArgumentException |
||
91 | */ |
||
92 | 7 | private function resolveConstructorParameterValue(ReflectionParameter $constructorParameter, array $config) |
|
112 | |||
113 | } |
||
114 |