Execute the route action, if no strategy was provided the action
will be executed by the call_user_func PHP function.

@param callable $container
@throws BadRouteException
@return mixed
170451
public function call(callable $container = null)
    {
        $this->action = $this->buildCallable($this->action, $container);

        if ($this->strategy === null) {
            return call_user_func_array($this->action, array_merge($this->defaults, $this->params));
        }

        if (!is_object($this->strategy)) {
            if ($container === null) {
                   $this->strategy = new $this->strategy;
            } else $this->strategy = $container($this->strategy);
        }

        return $this->callWithStrategy();
    }
617552
public function run(Container $container)
    {
        if ((! $this->ignoreMutex) && $this->description && $this->withoutOverlapping && (! $this->setMutex())) {
            return;
        }

        $this->runCommandInForeground($container);

        return $this->exitcode;
    }
314314
public function withContainer(ContainerInterface $container): ContainerizedInterface
    {
        $route = clone $this;
        $route->container = $container;
        if ($route->target instanceof TargetInterface) {
            $route->target = clone $route->target;
        }

        $route->pipeline = $route->makePipeline();

        return $route;
    }
404312
public function run(Container $container)
    {
        if ($this->description && $this->withoutOverlapping &&
            ! $this->mutex->create($this)) {
            return;
        }

        $pid = getmypid();

        register_shutdown_function(function () use ($pid) {
            if ($pid === getmypid()) {
                $this->removeMutex();
            }
        });

        parent::callBeforeCallbacks($container);

        try {
            $response = is_object($this->callback)
                        ? $container->call([$this->callback, '__invoke'], $this->parameters)
                        : $container->call($this->callback, $this->parameters);
        } finally {
            $this->removeMutex();

            parent::callAfterCallbacks($container);
        }

        return $response;
    }
667841
public function process(ContainerBuilder $container)
    {
        try {
            $chainRouter = $container->getDefinition("router.chainRequest");
        } catch (InvalidArgumentException $e) {
            return;
        }

        foreach ($container->findTaggedServiceIds("router.register") as $id => $attributes) {
            $priority = isset($attributes[0]["priority"]) ? $attributes[0]["priority"] : 0;
            $router = $container->getDefinition($id);
            $router->addMethodCall("setOption", array("matcher_cache_class", $container::camelize("ProjectUrlMatcher".$id)));
            $router->addMethodCall("setOption", array("generator_cache_class", $container::camelize("ProjectUrlGenerator".$id)));

            $chainRouter->addMethodCall("add", array(new Reference($id), $priority));
        }
        if (\defined("THELIA_INSTALL_MODE") === false) {
            $modules = ModuleQuery::getActivated();

            /** @var Module $module */
            foreach ($modules as $module) {
                $moduleBaseDir = $module->getBaseDir();
                $routingConfigFilePath = $module->getAbsoluteBaseDir() . DS . "Config" . DS . "routing.xml";

                if (file_exists($routingConfigFilePath)) {
                    $definition = new Definition(
                        $container->getParameter("router.class"),
                        array(
                            new Reference("router.module.xmlLoader"),
                            $routingConfigFilePath,
                            array(
                                "cache_dir" => $container->getParameter("kernel.cache_dir"),
                                "debug" => $container->getParameter("kernel.debug"),
                                "matcher_cache_class" => $container::camelize("ProjectUrlMatcher".$moduleBaseDir),
                                "generator_cache_class" => $container::camelize("ProjectUrlGenerator".$moduleBaseDir),
                            ),
                            new Reference("request.context")
                        )
                    );

                    $container->setDefinition("router.".$moduleBaseDir, $definition);

                    $chainRouter->addMethodCall("add", array(new Reference("router.".$moduleBaseDir), 150 + $module->getPosition()));
                }
            }
        }
    }
810225
public function pathResolvable(Container $container)
    {
        $this->setDependencies($container);

        $object = $this->getObjectRouteFromPath();
        if (!$object->id()) {
            return false;
        }

        $contextObject = $this->getContextObject();

        if (!$contextObject || !$contextObject->id()) {
            return false;
        }

        return (!!$contextObject->active() && !!$contextObject->isActiveRoute());
    }
1180174
protected function setControllerLoader(Container $container): callable
    {
        return $container->protect(function (string $name) use ($container) {
            $parts = \explode('_', $name);
            $class = $container['config']('suit.namespaces.controller', '\\App\\Controller\\');
            foreach ($parts as $part) {
                $class .= \ucfirst($part);
            }
            if (!$container->has('controller_'.$class)) {
                $container['controller_'.$class] = function ($container) use ($class) {
                    return new $class($container);
                };
            }

            return $container['controller_'.$class];
        });
    }
665123
public function process(ContainerBuilder $container): void
    {
        $this->injectParameters($container);

        $handlerDefinition = new Definition(UdpHandler::class, [
            '%service_bus.logger.graylog.udp_host%',
            '%service_bus.logger.graylog.udp_port%',
            '%service_bus.logger.graylog.gzip%',
            '%service_bus.logger.graylog.log_level%',
        ]);

        $container->addDefinitions([UdpHandler::class => $handlerDefinition]);

        (new LoggerCompilerPass())->process($container);

        $loggerDefinition = $container->getDefinition('service_bus.logger');

        $loggerDefinition->addMethodCall(
            'pushHandler',
            [new Reference(UdpHandler::class)]
        );
    }
83581
public final function dispatch(
       ContainerInterface $container,
       RouterInterface $router): ControllerInterface
   {
       try {
           $route = $router->match($this->request);
           if (method_exists($container, "set")) {
               $container->set(get_class($this->request), $this->request);
           }
           return $container->get($route->__toString());
       } catch (RouterException $e) {
           throw $e;
       } catch (Throwable $e) {
           throw new DispatcherException(
               "Can't dispatch: " . $e->getMessage());
       }
   }
169718
public function setContainer($container) : Router
    {
        $this->container = $container;
        $this->routeController->setContainer($container);
        $this->resourceController->setRouter($this);

        return $this;
    }
879455
public function run(Request $request)
    {
        $this->container = $this->container ?: Application::getInstance();
        $this->container->set(Request::class, $request);

        // Check and run controller
        if ($this->isControllerAction()) {
            return $this->runController();
        }

        return $this->runCallable();
    }
917542
public function dispatch(Request $request)
    {
        $this->currentRoute = null;

        $this->container->instance(Request::class, $request);

        $this->routesDispatched++;

        try {
            $response = $this->adapter->dispatch($request, $request->version());
        } catch (Exception $exception) {
            if ($request instanceof InternalRequest) {
                throw $exception;
            }

            $this->exception->report($exception);

            $response = $this->exception->handle($exception);
        }

        return $this->prepareResponse($response, $request, $request->format());
    }
1154437
public function pathResolvable(Container $container)
    {
        $event = $this->loadEventFromPath($container);
        return ($event instanceof EventInterface) && $event->id();
    }
1202854
public function execute($callback, array $parameters = [], $defaultMethod = null)
    {
        return $this->container->call($callback, $parameters, $defaultMethod);
    }
133327
protected function runTask($container, $task)
    {
        $macroOptions = $container->getMacroOptions($this->argument('task'));

        $confirm = $container->getTask($task, $macroOptions)->confirm;

        if ($confirm && ! $this->confirmTaskWithUser($task, $confirm)) {
            return;
        }

        if (($exitCode = $this->runTaskOverSSH($container->getTask($task, $macroOptions))) > 0) {
            foreach ($container->getErrorCallbacks() as $callback) {
                call_user_func($callback, $task);
            }

            return $exitCode;
        }

        foreach ($container->getAfterCallbacks() as $callback) {
            call_user_func($callback, $task);
        }
    }
900086
protected function runCommandInBackground(Container $container)
    {
        $this->callBeforeCallbacks($container);

        Process::fromShellCommandline($this->buildCommand(), base_path(), null, null, null)->run();
    }
1239798
protected function runCommandInForeground(Container $container)
	{
		(new Process(
			trim($this->buildCommand(), '& '), base_path(), null, null, null
		))->run();

		$this->callAfterCallbacks($container);
	}