1 | <?php |
||
14 | class BaseHostPlugin implements Plugin |
||
15 | { |
||
16 | /** |
||
17 | * @var UriInterface |
||
18 | */ |
||
19 | private $baseUri; |
||
20 | |||
21 | /** |
||
22 | * @var bool |
||
23 | */ |
||
24 | private $replace; |
||
25 | |||
26 | /** |
||
27 | * Available options for $config are: |
||
28 | * - replace: bool True will replace all hosts, false will only add host when none is specified. |
||
29 | * |
||
30 | * @param UriInterface $baseUri |
||
31 | * @param array $config |
||
32 | */ |
||
33 | public function __construct(UriInterface $baseUri, array $config = []) |
||
43 | |||
44 | /** |
||
45 | * {@inheritdoc} |
||
46 | */ |
||
47 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
||
58 | |||
59 | /** |
||
60 | * @param OptionsResolver $resolver |
||
61 | */ |
||
62 | private function configureOptions(OptionsResolver $resolver) |
||
69 | } |
||
70 |