@@ -13,32 +13,32 @@ |
||
13 | 13 | |
14 | 14 | abstract class AbstractMiddleware implements MiddlewareInterface |
15 | 15 | { |
16 | - protected function responseIsAlterable(ResponseInterface $response): bool |
|
17 | - { |
|
18 | - if ($response instanceof NullResponse) { |
|
19 | - return false; |
|
20 | - } |
|
21 | - |
|
22 | - if (!$GLOBALS['TSFE'] instanceof TypoScriptFrontendController) { // need for configuration |
|
23 | - return false; |
|
24 | - } |
|
25 | - |
|
26 | - if ('text/html' !== substr($response->getHeaderLine('Content-Type'), 0, 9)) { |
|
27 | - return false; |
|
28 | - } |
|
29 | - |
|
30 | - if (empty($response->getBody())) { |
|
31 | - return false; |
|
32 | - } |
|
33 | - |
|
34 | - return true; |
|
35 | - } |
|
36 | - |
|
37 | - protected function getStringStream(string $content): StreamInterface |
|
38 | - { |
|
39 | - $body = new Stream('php://temp', 'rw'); |
|
40 | - $body->write($content); |
|
41 | - |
|
42 | - return $body; |
|
43 | - } |
|
16 | + protected function responseIsAlterable(ResponseInterface $response): bool |
|
17 | + { |
|
18 | + if ($response instanceof NullResponse) { |
|
19 | + return false; |
|
20 | + } |
|
21 | + |
|
22 | + if (!$GLOBALS['TSFE'] instanceof TypoScriptFrontendController) { // need for configuration |
|
23 | + return false; |
|
24 | + } |
|
25 | + |
|
26 | + if ('text/html' !== substr($response->getHeaderLine('Content-Type'), 0, 9)) { |
|
27 | + return false; |
|
28 | + } |
|
29 | + |
|
30 | + if (empty($response->getBody())) { |
|
31 | + return false; |
|
32 | + } |
|
33 | + |
|
34 | + return true; |
|
35 | + } |
|
36 | + |
|
37 | + protected function getStringStream(string $content): StreamInterface |
|
38 | + { |
|
39 | + $body = new Stream('php://temp', 'rw'); |
|
40 | + $body->write($content); |
|
41 | + |
|
42 | + return $body; |
|
43 | + } |
|
44 | 44 | } |