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 | public function __construct(UriInterface $host, array $config = []) |
||
48 | |||
49 | /** |
||
50 | * {@inheritdoc} |
||
51 | */ |
||
52 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
||
63 | |||
64 | /** |
||
65 | * @param OptionsResolver $resolver |
||
66 | */ |
||
67 | private function configureOptions(OptionsResolver $resolver) |
||
74 | } |
||
75 |