/**
  * {@inheritdoc}
  */
 public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
 {
     $route = $request->getAttribute('route');
     $context = ['id' => $route->getArgument('id'), 'name' => $route->getArgument('name')];
     $rendered = $this->template->render($context);
     $response->getBody()->write($rendered);
     return $response;
 }
 /**
  * {@inheritdoc}
  */
 public function __invoke(ServerRequestInterface $request, ResponseInterface $response)
 {
     $rendered = $this->template->render();
     $response->getBody()->write($rendered);
     return $response;
 }