It executes the action of controller.
@throws Exception It throws if it was unable to assign controller with
route path.
327278
public function run()
    {
        $this->tryAssignController();
        if (!$this->isControllerAssigned()) {
            throw new Exception("It's unable to assign controller to this route path.");
        }
        $oCtrl = $this->createCtrl();
        $oCtrl->{$this->actionName}($this->actionArgs);
    }
522123
public function run()
    {
        // choosing which controller action must be executed
        $sAction = $this->_chooseCurrentAction();

        // executing action which returns name of template to render
        /** @var Controller $oController */
        $oController = $this->getInstance("Controller");

        $view = $oController->getView();
        $view->sendHeaders();

        try {
            $oController->$sAction();
        } catch (SetupControllerExitException $exception) {
        } finally {
            $view->display();
        }
    }
1244932
@Override
    protected void doExecute() throws Exception {
        final CommandHandler commandHandler = new CommandHandlerImpl(this.getLog());

        checkStageDirectoryExistence();

        checkRuntimeExistence(commandHandler);

        runFunctions(commandHandler);
    }
1072078
public function execute()
    {
        // init container.
        $this->initContainer();

        // routing
        $this->routing();

        // action chain.
        while ($action = $this->actionChain->getCurrentAction()) {

            // clear.
            $this->filterChain->clear();
            $this->container->register('errorList', $this->actionChain->getCurrentErrorList());

            $this->filterChain->setAction($action['controller'], $action['action']);
            $this->filterChain->build();
            $this->filterChain->execute();

            $this->actionChain->next();
        }

        // response.
        $this->response->execute();
    }
143761
public function run()
    {
        if (!$grantType = GrantType::getRequestValue('grant_type')) {
            throw new Exception(Yii::t('yuncms', 'The grant type was not specified in the request'));
        }
        if (isset($this->grantTypes[$grantType])) {
            $grantModel = Yii::createObject($this->grantTypes[$grantType]);
        } else {
            throw new Exception(Yii::t('yuncms', "An unsupported grant type was requested"), Exception::UNSUPPORTED_GRANT_TYPE);
        }
        $grantModel->validate();
        Yii::$app->response->data = $grantModel->getResponseData();
    }
1168740
public function execute()
    {
        $controller = $this->getController();

        if (!$controller) {
            $controller = $this->factoryController();
            $this->setController($controller);
        }

        $this->prepareController($controller);

        $action = $this->getAction();

        if (!$controller->respondTo($action)) {
            throw new Exceptions\ActionNotFoundException(sprintf(
                "Action '%s::%s' was not defined",
                $controller->getClass(),
                $action
            ));
        }

        $controller->beforeAction();
        $controller->send($action);
        $controller->afterAction();

        return $controller->getResponse();
    }
910275
public function run()
    {
        if (!($controller = \Devil::app()->url->getNext())) {
            $controller = 'site';
        }
        if ($controller = $this->loadController($controller)) {
            if (!$nextUrl = \Devil::app()->url->getNext()) {
                $nextUrl = 'index';
            }
            $controller->performAction(NamesHelper::urlToClass($nextUrl));
        } else {
            throw new HttpException(HttpException::NOT_FOUND);
        }
    }
667282
public function run()
  {
    $moduleFile = $this->getModulePath();
    $moduleName = $this->getModuleClass();

    /* load required /app/mod_{$this->moduleName}.php file */
    if(!file_exists($moduleFile) || !is_readable($moduleFile))
    {
      throw new Exception("Module resource not found (" . $this->getModuleName() . ")", 404);
    }
    else
    {
      require_once($moduleFile);
    }

    /* check if required module class exists */
    if(!class_exists($moduleName) || !in_array("TS3WA_Module", class_parents($moduleName)))
    {
      throw new Exception("Module resource not found (" . $this->getModuleName() . ")", 404);
    }

    /* spawn new module */
    $this->module = new $moduleName($this);

    /* check if required action method exists */
    if(!method_exists($this->module, $this->getActionMethod()))
    {
      throw new Exception("Action resource not found (" . $this->getActionName() . ")", 404);
    }

    /* call required action method */
    call_user_func(array($this->module, $this->getActionMethod()));

    /* render template */
    if($this->module->isRender())
    {
      $this->module->dispatch();
    }
  }
1229009
public function perform()
    {
        /** @var ControllerDeclaration $declaration */
        $declaration = $this->createDeclaration();

        foreach ($this->option('action') as $action) {
            $declaration->addAction($action);
        }

        $this->writeDeclaration($declaration);
    }
1024437
public function register($method, $url, $action)
    {
        if (in_array($method, $this->_methods)) {
            if (is_array($action)) {
                if (!empty($action)) {
                    $exp = explode('@', $action['uses']);
                    $this->_routes[] = [
                        'controller' => $exp[0],
                        'action'     => $exp[1],
                        'method'     => $method,
                        'uri'        => $url,
                    ];
                } else {
                    throw new \Exception('Cannot leave the action empty!');
                }
            } else {
                $exp = explode('@', $action);
                $this->_routes[] = [
                    'controller' => $exp[0],
                    'action'     => $exp[1],
                    'method'     => $method,
                    'uri'        => $url,
                ];
            }
        } else {
            throw new \Exception('Invalid routing method!');
        }
    }
1262276
public function loadRoute($uri)
    {
        $route = $this->getRoute($uri);

        if($route)
        {
            $controllerPath = $this->getControllerPath($route);

            if($controllerPath)
            {
                require $controllerPath;

                $controller = $this->initController($route->getControllerName(), $route->getControllerPath());
                $this->runController($controller, $route->getAction(), $route->getValues());
            }
        }
        else
        {
            throw new \Exception("No route was found that matched the requested URI.", 1);
        }
    }
1212245
private void doAction(List<ActionBlock> actions) throws ActionException {
        try {
            actions.get(nextStep).execute();
        } catch (ActionException e) {
            throw e;
        } catch (Exception e) {
            throw new ActionException("Exception raised by step: " + nextStep, e);
        }
    }
1054541
public void start() throws Exception {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(tc, "start", this);

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            SibTr.debug(tc, "Start ME, mode defaulting to ME_START_DEFAULT");
        start(JsConstants.ME_START_DEFAULT);

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(tc, "start");
    }
706227
public static function route() :void {

		// marker
		Profiler::setMarker('Router.route', 'framework');
		// get the requested url
		$request_url = Request::getUrl();
		// get the requested method
		$request_method = Request::getMethod();
		// Loop over each route and test to see if they are valid
		foreach(self::$_routes as $route) {
			// if the route matches
			if(self::routeMatch($request_url, $request_method, $route)) {
				// get it
				$matching_route = $route;
				// stop trying
				break;
			}
		}
		// marker
		Profiler::releaseMarker('Router.route');
		// if no match is found and we don't have an error route to fallback on
		if(!isset($matching_route)) {
			// throw a native exception since there is no cleaner alternative
			Throw new Exception('Router::route() no matching route', 404);
		}
		// send the matching route to the dispatcher
		self::forward($matching_route);	
		
	}
1335259
public function exec()
    {
        $name = $this->argument('name');
        $route = $this->argument('route');
        $resource = $this->option('resource');
        $notAliased = $this->option('not_aliased');
        //
        $process = Controller::create($name, $route, $resource);

        if (!$notAliased) {
            $class = ucfirst($name);
            //
            Alias::update('controllers.'.$class, 'App\Controller\\'.$name);
        }
        $this->show($process, $name);
    }
44799
public function execute() {
        if ($this->controller->get_status() != backup::STATUS_AWAITING) {
            throw new restore_controller_exception('restore_not_executable_awaiting_required', $this->controller->get_status());
        }
        $this->controller->set_status(backup::STATUS_EXECUTING);
        parent::execute();
        $this->controller->set_status(backup::STATUS_FINISHED_OK);

        // Check if we are restoring a course.
        if ($this->controller->get_type() === backup::TYPE_1COURSE) {

            // Check to see if we are on the same site to pass original course info.
            $issamesite = $this->controller->is_samesite();

            $otherarray = array('type' => $this->controller->get_type(),
                                'target' => $this->controller->get_target(),
                                'mode' => $this->controller->get_mode(),
                                'operation' => $this->controller->get_operation(),
                                'samesite' => $issamesite
            );

            if ($this->controller->is_samesite()) {
                $otherarray['originalcourseid'] = $this->controller->get_info()->original_course_id;
            }

            // Trigger a course restored event.
            $event = \core\event\course_restored::create(array(
                'objectid' => $this->get_courseid(),
                'userid' => $this->get_userid(),
                'context' => context_course::instance($this->get_courseid()),
                'other' => $otherarray
            ));
            $event->trigger();
        }
    }
775791
public function runApplication()
    {
        $routeCollection = $this->createRouteCollection();
        $dispatcher = $routeCollection->getDispatcher();

        $request = $this->createRequest();
        $response = $dispatcher->dispatch($request->getMethod(), $request->getPathInfo());
        $response->send();
    }