| 1 | <?php |
||
| 14 | class AddHostPlugin implements Plugin |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var UriInterface |
||
| 18 | */ |
||
| 19 | private $host; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var bool |
||
| 23 | */ |
||
| 24 | private $replace; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param UriInterface $host |
||
| 28 | * @param array $config { |
||
| 29 | * |
||
| 30 | * @var bool $replace True will replace all hosts, false will only add host when none is specified. |
||
| 31 | * } |
||
| 32 | */ |
||
| 33 | 5 | public function __construct(UriInterface $host, array $config = []) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * {@inheritdoc} |
||
| 50 | */ |
||
| 51 | 3 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
|
| 62 | |||
| 63 | /** |
||
| 64 | * @param OptionsResolver $resolver |
||
| 65 | */ |
||
| 66 | 5 | private function configureOptions(OptionsResolver $resolver) |
|
| 73 | } |
||
| 74 |