public function dispatch($controller, array $vars)
{
$request = $this->container->get('Symfony\\Component\\HttpFoundation\\Request');
$response = $this->invokeController($controller, array_merge([$request], array_values($vars)));
if ($response instanceof Response && $response->getContent() !== '') {
return $this->serialize($response->getContent(), $request, $response);
}
return $response;
}