1 | <?php |
||
10 | class PsrResponseFactory implements ResponseFactoryInterface |
||
11 | { |
||
12 | /** |
||
13 | * Base response object. |
||
14 | * @var ResponseInterface |
||
15 | */ |
||
16 | protected $response; |
||
17 | |||
18 | /** |
||
19 | * Callback to create stream. |
||
20 | * @var Closure |
||
21 | */ |
||
22 | protected $streamCallback; |
||
23 | |||
24 | /** |
||
25 | * Create PsrResponseFactory instance. |
||
26 | * @param ResponseInterface $response Base response object. |
||
27 | * @param Closure $streamCallback Callback to create stream. |
||
28 | */ |
||
29 | public function __construct(ResponseInterface $response, Closure $streamCallback) |
||
34 | |||
35 | /** |
||
36 | * Create response. |
||
37 | * @param FilesystemInterface $cache Cache file system. |
||
38 | * @param string $path Cached file path. |
||
39 | * @return ResponseInterface Response object. |
||
40 | */ |
||
41 | public function create(FilesystemInterface $cache, $path) |
||
66 | } |
||
67 |