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