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