| 1 | <?php | ||
| 23 | final class CallAdapterProvider | ||
| 24 | { | ||
| 25 | /** | ||
| 26 | * @var CallAdapterFactory[] | ||
| 27 | */ | ||
| 28 | private $callAdapterFactories; | ||
| 29 | |||
| 30 | /** | ||
| 31 | * Constructor | ||
| 32 | * | ||
| 33 | * @param CallAdapterFactory[] $callAdapterFactories | ||
| 34 | */ | ||
| 35 | 32 | public function __construct(array $callAdapterFactories) | |
| 39 | |||
| 40 | /** | ||
| 41 | * Given a type, find the first available [@see CallAdapterFactory] and return it | ||
| 42 | * | ||
| 43 | * @param TypeToken $type | ||
| 44 | * @return CallAdapter | ||
| 45 | * @throws \LogicException | ||
| 46 | */ | ||
| 47 | 20 | public function get(TypeToken $type): CallAdapter | |
| 57 | } | ||
| 58 |