Conditions | 1 |
Paths | 1 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
30 | public function create(FilesystemInterface $cache, $path) |
||
31 | { |
||
32 | $contentType = $cache->getMimetype($path); |
||
33 | $contentLength = $cache->getSize($path); |
||
34 | |||
35 | $response = new Response(); |
||
36 | $response->data(stream_get_contents($cache->readStream($path))) |
||
37 | ->header([ |
||
38 | 'Content-Type' => $contentType, |
||
39 | 'Content-Length' => $contentLength |
||
40 | ]); |
||
41 | |||
42 | return $response; |
||
43 | } |
||
44 | } |
||
45 |