| 1 | <?php |
||
| 13 | class Dispatcher |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var HttpClient |
||
| 17 | */ |
||
| 18 | private $client; |
||
| 19 | /** |
||
| 20 | * @var Targets |
||
| 21 | */ |
||
| 22 | private $targets; |
||
| 23 | /** |
||
| 24 | * @var DispatchStrategy |
||
| 25 | */ |
||
| 26 | private $strategy; |
||
| 27 | |||
| 28 | 48 | public function __construct(HttpClient $client, Targets $targets, DispatchStrategy $strategy) |
|
| 34 | |||
| 35 | 48 | public function dispatch(SlimRequest $request, ResponseInterface $response, string $action): ResponseInterface |
|
| 40 | |||
| 41 | /** |
||
| 42 | * Workaround for https://github.com/slimphp/Slim-Psr7/issues/11 |
||
| 43 | */ |
||
| 44 | 48 | private function resetHeaderOriginalKeys(SlimRequest $request): void |
|
| 55 | } |
||
| 56 |