1 | <?php |
||
10 | class BaseUriPlugin implements Plugin |
||
11 | { |
||
12 | /** |
||
13 | * @var UriInterface |
||
14 | */ |
||
15 | private $baseUri; |
||
16 | |||
17 | /** |
||
18 | * |
||
19 | * @param UriInterface $baseUri |
||
20 | */ |
||
21 | public function __construct(UriInterface $baseUri) |
||
25 | |||
26 | /** |
||
27 | * Handle the request and return the response coming from the next callable. |
||
28 | * |
||
29 | * @param RequestInterface $request |
||
30 | * @param callable $next Next middleware in the chain, the request is passed as the first argument |
||
31 | * @param callable $first First middleware in the chain, used to to restart a request |
||
32 | * |
||
33 | * @return Promise |
||
34 | */ |
||
35 | public function handleRequest(RequestInterface $request, callable $next, callable $first) |
||
44 | |||
45 | /** |
||
46 | * @param UriInterface $uri |
||
47 | * |
||
48 | * @return UriInterface |
||
49 | */ |
||
50 | private function modifyUri(UriInterface $uri) |
||
72 | } |
||
73 |