Forwards to the given controller and action

@param string $controller The name of controller
@param null|string $action The name of action
@param array $params The request parameters
353902
public function forward($controller, $action = null, array $params = array())
    {
        $this->response = $this->dispatch($controller, $action, $params);
        $this->preventPreviousDispatch();
    }
1247881
private function executeAction(string $action)
    {
        list($controller, $method) = explode('@', $action);

        $class = '\App\Controllers\\'.ucfirst($controller).'Controller';

        if (!class_exists($class)) {
            throw new ExceptionHandler('Class "'.$class.'" not found.');
        }

        $controllerInstantiate = new $class();

        if (!method_exists($controllerInstantiate, $method)) {
            throw new ExceptionHandler('Method "'.$method.'" not found in '.$class.'.');
        }

        return call_user_func_array([new $controllerInstantiate, $method], []);
    }
141672
public function forward($action, $controller = null, $extension = null, $params = array())
	{
        //as we use a route resolver, it's easier to rebuild the URL to resolve it 
        $this->forwardUrl(\tao_helpers_Uri::url($action, $controller, $extension, $params));
	}
198787
protected function checkActionAlreadyExists($action, $controllers)
    {
        $controllerName = $action->getControllerName();
        if (!array_key_exists($controllerName, $controllers)) {
            return false;
        }

        if (!array_key_exists($action->getMethod(), $controllers[$controllerName])) {
            return false;
        }

        return true;
    }
1372677
public function hasAction($controller, $action = null)
    {
        if ($action === null) {
            list($controller, $action) = explode('.', $controller);
        }
        return in_array("{$controller}.{$action}", $this->action_names);
    }
955446
public function action(callable $action, $params = [], &$result = null)
    {
        return $this->db->action($action, $params, $result);
    }
369187
public static function href($controller = null, string $action = null, array $params = null): string
    {
        return Application::route()->href($controller, $action, $params);
    }
720442
protected function _buildActionArgs($controller, $action, $params)
    {
        $args = [];
        $missing = [];

        $di = $this->_di;

        $parameters = (new \ReflectionMethod($controller, $action . 'Action'))->getParameters();
        foreach ($parameters as $parameter) {
            $name = $parameter->getName();
            $value = null;

            $type = $parameter->getClass();
            if ($type !== null) {
                $type = $type->getName();
            } elseif ($parameter->isDefaultValueAvailable()) {
                $type = gettype($parameter->getDefaultValue());
            }

            if ($className = ($c = $parameter->getClass()) ? $c->getName() : null) {
                if ($di->has($name)) {
                    $value = $di->get($name);
                } elseif ($di->has($className)) {
                    $value = $di->get($className);
                } else {
                    $value = $di->getShared($className);
                }
            } elseif (isset($params[$name])) {
                $value = $params[$name];
            } elseif ($this->request->has($name)) {
                $value = $this->request->get($name);
            } elseif (count($params) === 1 && count($parameters) === 1) {
                $value = $params[0];
            } elseif ($parameter->isDefaultValueAvailable()) {
                $value = $parameter->getDefaultValue();
            }

            if ($value === null) {
                $missing[] = $name;
                continue;
            }

            switch ($type) {
                case 'boolean':
                    $value = (bool)$value;
                    break;
                case 'integer':
                    $value = (int)$value;
                    break;
                case 'double':
                    $value = (float)$value;
                    break;
                case 'string':
                    $value = (string)$value;
                    break;
                case 'array':
                    $value = (array)$value;
                    break;
            }

            if ($parameter->isArray()) {
                $args[] = (array)$value;
            } else {
                $args[] = $value;
            }
        }

        if ($missing) {
            throw new MissingRequiredFieldsException($missing);
        }

        return $args;
    }
239043
public function amOnAction($action, $params = [])
    {
        $route = $this->getRouteByAction($action);
        $absolute = !is_null($route->domain());
        $url = $this->app['url']->action($action, $params, $absolute);

        $this->amOnPage($url);
    }
892373
public function setMvcUrl($controller = null, $action = null, array $params = [])
    {
        $this->mvcUrl = [
            'controller' => trim($controller),
            'action'     => trim($action),
            'params'     => $params
        ];
        return $this;
    }
70135
public function doAction($action,$params){
        if(method_exists($this,$action)){
            $this->$action($params);
        }
        else{
            $this->ActionNotFound($action,$params);
        }
    }
657930
public void forward(String controllerName) throws Throwable {
        SilentGo instance = SilentGo.me();
        ((ActionChain) instance.getConfig().getActionChain().getObject()).doAction(instance.getConfig().getCtx().get().getActionParam());
    }
589011
public function forward(
	    $controller,
        $actionName = 'index' ,
        $parameters = array()
    ) {
		if (is_string($controller)) {
			$controller = new $controller;
		}
		return $controller->invokeMethod($actionName, $parameters);
	}
1213806
static function load($controller, $action = '', $params = array())
	{

		$class_name = ucfirst($controller);
		$method = $action;
		$tc = "Controller\\" . $class_name;
		if (!class_exists($tc)) return self::er("Class $tc does not exist.");
		$this_object = new $tc($params);


		if (!method_exists($this_object, $method)) {
			return self::er("Method $method in $tc does not exist.");
		}


		if (!is_callable(array($this_object, $method))) return self::er("Method $method in $tc is not callable.");
		if (is_callable(array($this_object, "__before"))) {
			call_user_func(array($this_object, "__before"));
		}


		call_user_func(array($this_object, $method));

		if (is_callable(array($this_object, "__after"))) {
			call_user_func(array($this_object, "__after"));
		}
		return $this_object;
	}
1123415
protected function forwardToRequest(ActionRequest $request)
    {
        $packageKey = $request->getControllerPackageKey();
        $subpackageKey = $request->getControllerSubpackageKey();
        if ($subpackageKey !== null) {
            $packageKey .= '\\' . $subpackageKey;
        }
        $this->forward($request->getControllerActionName(), $request->getControllerName(), $packageKey, $request->getArguments());
    }
1060909
public function setActionParameters($action, array $parameters): void
    {
        if ('submit_button' === $action) {
            $this->setSubmitButton(
                array_merge(
                    $this->getSubmitButton(),
                    [
                        'route_parameters' => $parameters,
                    ]
                )
            );

            return;
        }
        if ('reset_button' === $action) {
            $this->setResetButton(
                array_merge(
                    $this->getResetButton(),
                    [
                        'route_parameters' => $parameters,
                    ]
                )
            );

            return;
        }
        $this->setAction(
            $action,
            array_merge(
                $this->getAction($action),
                [
                    'route_parameters' => $parameters,
                ]
            )
        );
    }
350205
public function forward($forward = [])
    {
        $controller = isset($forward['controller'])
            ? $forward['controller']
            : null;

        $action = isset($forward['action'])
            ? $forward['action']
            : null;
        
        $params = isset($forward['params'])
            ? $forward['params']
            : [];

        $this->setControllerName($controller);
        $this->setActionName($action);
        $this->setParams($params);

        $this->isCallableOrException();
        return $this->dispatch();
    }