yii\base\Controller::run PHP Method

run() public method

The route can be either an ID of an action within this controller or a complete route consisting of module IDs, controller ID and action ID. If the route starts with a slash '/', the parsing of the route will start from the application; otherwise, it will start from the parent module of this controller.
See also: runAction()
public run ( string $route, array $params = [] ) : mixed
$route string the route to be handled, e.g., 'view', 'comment/view', '/admin/comment/view'.
$params array the parameters to be passed to the action.
return mixed the result of the action.
    public function run($route, $params = [])
    {
        $pos = strpos($route, '/');
        if ($pos === false) {
            return $this->runAction($route, $params);
        } elseif ($pos > 0) {
            return $this->module->runAction($route, $params);
        } else {
            return Yii::$app->runAction(ltrim($route, '/'), $params);
        }
    }