1 | <?php |
||
11 | class FileContentResponse extends Response implements FileResponseInterface |
||
12 | { |
||
13 | use Response\InjectContentTypeTrait; |
||
14 | /** |
||
15 | * @var resource |
||
16 | */ |
||
17 | protected $resource; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $content; |
||
23 | |||
24 | /** |
||
25 | * @return resource |
||
26 | */ |
||
27 | public function getResource() |
||
31 | |||
32 | /** |
||
33 | * @return string |
||
34 | */ |
||
35 | public function getContent() |
||
39 | |||
40 | /** |
||
41 | * @param mixed $content |
||
42 | */ |
||
43 | public function setContent($content) |
||
47 | |||
48 | /** |
||
49 | * Create an empty response with the given status code. |
||
50 | * |
||
51 | * @param string|resource|Stream $content |
||
52 | * @param int $status Status code for the response, if any. |
||
53 | * @param array $headers Headers for the response, if any. |
||
54 | */ |
||
55 | public function __construct($content = null, $status = 204, array $headers = []) |
||
60 | |||
61 | protected function createBody($content) |
||
82 | } |
||
83 |