1 | <?php |
||
15 | final class AddHostPlugin implements Plugin |
||
16 | { |
||
17 | /** |
||
18 | * @var UriInterface |
||
19 | */ |
||
20 | private $host; |
||
21 | |||
22 | /** |
||
23 | * @var bool |
||
24 | */ |
||
25 | private $replace; |
||
26 | |||
27 | /** |
||
28 | * @param UriInterface $host |
||
29 | * @param array $config { |
||
30 | * |
||
31 | * @var bool $replace True will replace all hosts, false will only add host when none is specified. |
||
32 | * } |
||
33 | */ |
||
34 | 10 | public function __construct(UriInterface $host, array $config = []) |
|
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | 6 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
|
66 | |||
67 | /** |
||
68 | * @param OptionsResolver $resolver |
||
69 | */ |
||
70 | 10 | private function configureOptions(OptionsResolver $resolver) |
|
77 | } |
||
78 |