1 | <?php |
||
11 | class Rename |
||
12 | { |
||
13 | /** |
||
14 | * @var array Renamed paths |
||
15 | */ |
||
16 | private $paths; |
||
17 | |||
18 | /** |
||
19 | * Constructor. Set the paths. |
||
20 | * |
||
21 | * @param array $paths ['real-name' => 'new-name'] |
||
22 | */ |
||
23 | public function __construct(array $paths) |
||
27 | |||
28 | /** |
||
29 | * Execute the middleware. |
||
30 | * |
||
31 | * @param RequestInterface $request |
||
32 | * @param ResponseInterface $response |
||
33 | * @param callable $next |
||
34 | * |
||
35 | * @return ResponseInterface |
||
36 | */ |
||
37 | public function __invoke(RequestInterface $request, ResponseInterface $response, callable $next) |
||
54 | } |
||
55 |