{@inheritDoc}
@see \Seeren\Router\Route\RouteInterface::setController()
162625
public function setController(string $controller): RouteInterface
   {
       if (!preg_match(
               "/^([A-Z]{1}[a-zA-Z_0-9]{1,31}(\/{1})?){1,3}$/",
               $controller)) {
           throw new InvalidArgumentException(
               "Can't set controller: invalid relative controller class name "
             . $controller);
       }
       $this->controller = rtrim($controller, "/");
       return $this;
   }
1162572
public function makeController($controller)
    {
        $namespace = $this->router->getNamespace();

        $classname = "{$namespace}\\{$controller}";

        if (class_exists($classname)) {
            return $this->container->make($classname);
        }

        throw new RoutingException("Controller [{$classname}] do not exists.");
    }
895796
public function setRoute($route, array $params = array())
    {
        $this->route = $route;
        $this->routeParams = $params;

        return $this;
    }
1150082
public function setCache($cache)
    {
        $this->cache = $cache;
        if ($this->isBool($cache) && $cache === false) {
            $this->cache = $cache;
        } else {
            if (is_object($cache)) {
                if ($this->isInstanceOf($cache, CacheStorage::class)) {
                    $this->cache = $cache;
                } else {
                    throw new RouterException('$cache must either be a boolean or instance of ' . CacheStorage::class . '.');
                }
            } else {
                $this->cache = $this->cache($cache);
            }
        }
    }
532417
public function setRoute(\Wucdbm\Bundle\MenuBuilderBundle\Entity\Route $route) {
        $this->route = $route;

        return $this;
    }
95120
protected function bindToController($request, $url, $controller)
    {
        $array  = explode('|', $url, 2);
        $action = !empty($array[0]) ? $array[0] : $this->router->config('default_action');
        $param  = [];

        if (!empty($array[1])) {
            $this->parseUrlParams($request, $array[1], $param);
        }

        return new ControllerDispatch($request, $this, $controller . '/' . $action, $param);
    }
569770
public function setController($controller)
        {
            if (null !== $controller && !is_string($controller)) {
                throw new Exception(
                    'Invalid argument: $controller must be a string or null'
                );
            }

            $this->_controller = $controller;
            $this->_hrefCache  = null;

            return $this;
        }
169718
public function setContainer($container) : Router
    {
        $this->container = $container;
        $this->routeController->setContainer($container);
        $this->resourceController->setRouter($this);

        return $this;
    }
1338440
public function setClass($pClass)
    {
        if (is_string($pClass)) {
            $this->createControllerClass($pClass);
        } elseif (is_object($pClass)) {
            $this->controller = $pClass;
        } else {
            $this->controller = $this;
        }
    }
758991
private function setRoutes() : void
    {
        $this->routes = $this->routeProvider->getRoutes();
        $this->syRouteCollection = new RouteCollection();
        foreach ($this->routes as $route) {
            $syRoute = new SymfonyRoute(
                $route->getPath(),
                $route->getParamsDefaults(),
                $route->getParamsRequirements(),
                [],
                '',
                [],
                $route->getMethods()
            );
            $this->syRouteCollection->add($route->getName(), $syRoute);
        }
    }
454544
public function setRoute(RouteInterface $route): RouterInterface
    {
        $regexp = $route->getRegexp();
        $this->_routes[$regexp] = $route;
        return $this;
    }
504487
protected function makeController($controller)
    {
        Controller::setRouter($this->router);

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

        if ( ! $controller instanceof AdminPageController)
        {
            if ($this->container->isShared('post'))
            {
                $controller->setPost($this->container['post']);
            }

            $controller->setQuery($this->container['query']);
        }

        if (method_exists($controller, 'boot'))
        {
            $this->container->call([$controller, 'boot']);
        }

        return $controller;
    }
556099
protected function configureController(Controller $controller)
    {
        parent::configureController($controller);
        $controller[] = new Entity($this->entityName);
    }
342773
public function instanceController(): Controller
    {
        $this->sawContainer->setEnvironment(SawEnv::controller());

        return new Controller(
            $this->container->get('WorkCycle'),
            $this->container->get(ControllerCore::class),
            $this->container->get('ControllerServer'),
            $this->container->get(CommandDispatcher::class),
            $this->daemonConfig->getControllerPid() // todo
        );
    }
192927
private function setResource($url, $route, $controller, $target)
    {
        $url = $url.$route;

        $route = new self($url);

        $closure = $this->getResourceClosure($controller, $target);

        $route->setClosure($closure);
        $route->setMethod('resource');
        $route->setTarget($controller, $target);

        $this->addResource($route);

        $route->add();

        return $route;
    }
751070
protected function setControllerVars($controller)
    {
        $this->controller = $controller;

        if (is_callable($controller)) {
            $this->setControllerCallable($controller);
        } else {
            $this->usesCallable = false;
            $atCharPos = strpos($controller, '@');

            // Make sure the "@" is somewhere in the middle of the string
            if ($atCharPos === false || $atCharPos === 0 || $atCharPos === mb_strlen($controller) - 1) {
                throw new InvalidArgumentException('Controller string is not formatted correctly');
            }

            $this->controllerName = substr($controller, 0, $atCharPos);
            $this->controllerMethod = substr($controller, $atCharPos + 1);
        }
    }
333880
public function setCoreRequestController($value)
    {
        $this->setFieldName('request_controller');
        $this->loadObject(true);
        $this->setFieldValue($value);

        return $this;
    }