code: public function getController(Request $request)
      {
          if (! $controller = $request->attributes->get('_controller')) {
              throw new \LogicException(sprintf(
                  'Controller for URI "%s" could not be found because the "_controller" parameter is missing.',
                  $request->getPathInfo()
              ));
          }
  
          try {
              return $this->callableResolver->resolve($controller);
          } catch (NotCallableException $e) {
              throw new \InvalidArgumentException(sprintf(
                  'Controller for URI "%s" is not callable: %s',
                  $request->getPathInfo(),
                  $e->getMessage()
              ));
          }
      }
docs: {@inheritdoc}