| @@ 199-213 (lines=15) @@ | ||
| 196 | * @param $dispatchResponse |
|
| 197 | * @return RouterResponse |
|
| 198 | */ |
|
| 199 | protected function _createRouterResponse($dispatchResponse) |
|
| 200 | { |
|
| 201 | if ($dispatchResponse['handler']['type'] === 'object') { |
|
| 202 | $dispatchResponse['content'] = $this->serializer->unserialize($dispatchResponse['handler']['content']); |
|
| 203 | } else { |
|
| 204 | $dispatchResponse['content'] = $dispatchResponse['handler']['content']; |
|
| 205 | } |
|
| 206 | ||
| 207 | return new RouterResponse( |
|
| 208 | $dispatchResponse['statusCode'], |
|
| 209 | $dispatchResponse['content'], |
|
| 210 | $dispatchResponse['handler']['name'], |
|
| 211 | $dispatchResponse['vars'] |
|
| 212 | ); |
|
| 213 | } |
|
| 214 | ||
| 215 | /** |
|
| 216 | * @inheritdoc |
|
| @@ 113-128 (lines=16) @@ | ||
| 110 | * @param $dispatchResponse |
|
| 111 | * @return RouterResponse |
|
| 112 | */ |
|
| 113 | public function createRouterResponse($dispatchResponse) |
|
| 114 | { |
|
| 115 | if ($dispatchResponse['handler']['type'] === 'object') { |
|
| 116 | $dispatchResponse['content'] = $this->serializer->unserialize($dispatchResponse['handler']['content']); |
|
| 117 | } else { |
|
| 118 | $dispatchResponse['content'] = $dispatchResponse['handler']['content']; |
|
| 119 | } |
|
| 120 | ||
| 121 | return new RouterResponse( |
|
| 122 | $dispatchResponse['statusCode'], |
|
| 123 | $dispatchResponse['allowedMethods'], |
|
| 124 | $dispatchResponse['content'], |
|
| 125 | $dispatchResponse['vars'], |
|
| 126 | $dispatchResponse['handler']['name'] |
|
| 127 | ); |
|
| 128 | } |
|
| 129 | ||
| 130 | public function createFastRouteHandler(RouteInterface $route) |
|
| 131 | { |
|