public function handle(ServerRequestInterface $request): ResponseInterface
    {
        $container = new ControllerContainer($this->container, $request);

        $placeholders = array_map([$request, 'getAttribute'], $this->attributes);

        $controller = $container->get($this->controller);

        if (is_object($controller)) {

            $action = [$controller, $this->method];

            return ($this->factory)($action)->value($container, $placeholders);

        }

        throw new ContainedControllerTypeException($this->controller, $controller);
    }