| 1 | <?php |
||
| 12 | class ResolverHost implements Resolver |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var Resolver[] |
||
| 16 | */ |
||
| 17 | protected $resolvers; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @param Resolver[] $resolvers |
||
| 21 | */ |
||
| 22 | 1 | public function __construct($resolvers) |
|
| 26 | |||
| 27 | /** |
||
| 28 | * Resolve a given Parameter by passing it through the resolver stack. |
||
| 29 | * |
||
| 30 | * @param ReflectionParameter $param |
||
| 31 | * @param callable|null $next resolver delegate (used internally when composing hosts) |
||
| 32 | * |
||
| 33 | * @return mixed |
||
| 34 | * |
||
| 35 | * @throws UnresolvedException if the given Parameter could not be resolved |
||
| 36 | */ |
||
| 37 | 1 | public function resolve(ReflectionParameter $param, $next = null) |
|
| 51 | |||
| 52 | /** |
||
| 53 | * @param int $index |
||
| 54 | * |
||
| 55 | * @return callable function (ReflectionParameter $param): mixed |
||
| 56 | */ |
||
| 57 | 1 | protected function delegate($index) |
|
| 69 | } |
||
| 70 |