Conditions | 2 |
Paths | 2 |
Total Lines | 13 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
62 | protected function output(string $content, ?string $format = null): static |
||
63 | { |
||
64 | $response = $this->getResponse(); |
||
65 | |||
66 | if ($format !== null) { |
||
67 | $contentType = $this->getMime($format); |
||
68 | $response = $response->withHeader('Content-Type', $contentType); |
||
69 | } |
||
70 | |||
71 | $response->getBody()->write($content); |
||
72 | $this->setResponse($response); |
||
73 | |||
74 | return $this; |
||
75 | } |
||
77 |