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