1 | <?php |
||
12 | class Minify |
||
13 | { |
||
14 | use Utils\CacheTrait; |
||
15 | use Utils\ResolverTrait; |
||
16 | |||
17 | /** |
||
18 | * @var bool Minify only cacheable responses |
||
19 | */ |
||
20 | private $forCache = false; |
||
21 | |||
22 | /** |
||
23 | * Set forCache directive. |
||
24 | * |
||
25 | * @param bool $forCache |
||
26 | * |
||
27 | * @return self |
||
28 | */ |
||
29 | public function forCache($forCache = true) |
||
35 | |||
36 | /** |
||
37 | * Execute the middleware. |
||
38 | * |
||
39 | * @param ServerRequestInterface $request |
||
40 | * @param ResponseInterface $response |
||
41 | * @param callable $next |
||
42 | * |
||
43 | * @return ResponseInterface |
||
44 | */ |
||
45 | public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next) |
||
64 | } |
||
65 |