1 | <?php declare(strict_types = 1); |
||
10 | final class JsonRequestParserMiddleware implements MiddlewareInterface |
||
11 | { |
||
12 | /** @var string[] array of regexes to check against content-types */ |
||
13 | private $jsonContentTypes; |
||
14 | |||
15 | 5 | public function __construct(array $jsonContentTypes = null) |
|
22 | |||
23 | 4 | public function process(ServerRequestInterface $request, DelegateInterface $delegate): ResponseInterface |
|
30 | |||
31 | 4 | private function isJsonRequest(?string $requestContentType) |
|
40 | |||
41 | 3 | private function parseBody(ServerRequestInterface $request) : array |
|
50 | } |
||
51 |