This method handles requests like _task=mail&_action=plugin.foo
It executes the callback function that was registered with the given action.

@param string $action Action name
977268
public function exec_action($action)
    {
        if (isset($this->actions[$action])) {
            call_user_func($this->actions[$action]);
        }
        else if (rcube::get_instance()->action != 'refresh') {
            rcube::raise_error(array('code' => 524, 'type' => 'php',
                'file' => __FILE__, 'line' => __LINE__,
                'message' => "No handler found for action $action"), true, true);
        }
    }
695458
private function runAction($action, $args)
    {
        $function = $action['function'];
        $argsNumber = $action['arguments'];

        $class = (isset($function[0])) ? $function[0] : false;
        $method = (isset($function[1])) ? $function[1] : false;

        $args = $this->getArguments($argsNumber, $args);

        if (! ($class && $method) && function_exists($function)) {
            return call_user_func($function, $args);
        } elseif ($obj = call_user_func([$class, $this->singleton])) {
            if ($obj !== false) {
                return call_user_func_array([$obj, $method], $args);
            }
        } elseif (class_exists($class)) {
            $instance = new $class;

            return call_user_func_array([$instance, $method], $args);
        }
    }
642968
private function triggerAction($action): Response
    {
        if (is_callable($action)) {
            return $this->returnResponse(
                $this->container->call($action)
            );
        } elseif (is_array($action)) {
            return $this->returnResponse(
                $this->container->call(
                    [
                        $action['controller'],
                        $action['method'],
                    ],
                    $action['arguments']
                )
            );
        }

        throw new \InvalidArgumentException('Route\'s action could not be handled.');
    }
1180443
protected function actionRedirect($action)
    {
        if ($this->redirect)
        {
            return;
        }

        $this->redirect = $action->getAttribute('uri');
        /** @var TAdminUI $page */
        $page = Eresus_Kernel::app()->getPage();
        $this->redirect = $page->replaceMacros($this->redirect);
    }
120938
protected function handleAction(Config\Action $action) : void
    {
        $this->io->write(['', 'Action: <comment>' . $action->getAction() . '</comment>']);

        if (!$this->doConditionsApply($action->getConditions())) {
            $this->io->write(
                ['', 'Skipped due to failing conditions']
            );
            return;
        }

        $execMethod = self::getExecMethod(Util::getExecType($action->getAction()));
        $this->{$execMethod}($action);
    }
893484
protected function handleAction($request, $action)
    {
        $classMessage = Director::isLive() ? 'on this handler' : 'on class ' . static::class;

        if (!$this->hasMethod($action)) {
            return new HTTPResponse("Action '$action' isn't available $classMessage.", 404);
        }

        $res = $this->extend('beforeCallActionHandler', $request, $action);
        if ($res) {
            return reset($res);
        }

        $actionRes = $this->$action($request);

        $res = $this->extend('afterCallActionHandler', $request, $action, $actionRes);
        if ($res) {
            return reset($res);
        }

        return $actionRes;
    }
926909
public function execute($action) {
        admin_externalpage_setup('tool_usertours/tours');
        // Add the main content.
        switch($action) {
            case self::ACTION_NEWTOUR:
            case self::ACTION_EDITTOUR:
                $this->edit_tour(optional_param('id', null, PARAM_INT));
                break;

            case self::ACTION_MOVETOUR:
                $this->move_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_EXPORTTOUR:
                $this->export_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_IMPORTTOUR:
                $this->import_tour();
                break;

            case self::ACTION_VIEWTOUR:
                $this->view_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_HIDETOUR:
                $this->hide_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_SHOWTOUR:
                $this->show_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_DELETETOUR:
                $this->delete_tour(required_param('id', PARAM_INT));
                break;

            case self::ACTION_RESETFORALL:
                $this->reset_tour_for_all(required_param('id', PARAM_INT));
                break;

            case self::ACTION_NEWSTEP:
            case self::ACTION_EDITSTEP:
                $this->edit_step(optional_param('id', null, PARAM_INT));
                break;

            case self::ACTION_MOVESTEP:
                $this->move_step(required_param('id', PARAM_INT));
                break;

            case self::ACTION_DELETESTEP:
                $this->delete_step(required_param('id', PARAM_INT));
                break;

            case self::ACTION_LISTTOURS:
            default:
                $this->print_tour_list();
                break;
        }
    }
159769
protected function _event($action, $data = [])
    {
        $_event = new Event('Controller.PostTypes.' . $this->type['name'] . '.' . $action, $this, $data);
        $this->eventManager()->dispatch($_event);
    }
1357022
public function addIntendedAction($action)
    {
        if (empty($this->current_node->type) || $this->current_node->type == 'welcome') {
            return;
        }

        // If it's ->then() intended action. We'll save next action as id
        if (is_callable($action)) {
            $related = $this->current_node;

            $then_node = $this->persistNode([
                [
                    'type'    => 'callback',
                    'content' => $action,
                ],
            ], 'intended', 'IA#' . $related->id);

            $related->wait = $then_node->id;

            $related->save();
        } else {
            $this->current_node->wait = $action;

            $this->current_node->save();
        }
    }
1242067
public function callAction($action, $defaultAction = 'request') {
		if (method_exists($this, $action)) return $this->{$action}();
		else return $this->{$defaultAction}();
	}
748841
protected function processAction(DOMNode $action)
    {
        $actionName = substr($action->nodeName, strlen($action->lookupPrefix(self::NS)) + 1);
        $methodName = 'action' . $actionName;
        if (method_exists($this, $methodName))
        {
            $this->$methodName($action);
        }
    }
70135
public function doAction($action,$params){
        if(method_exists($this,$action)){
            $this->$action($params);
        }
        else{
            $this->ActionNotFound($action,$params);
        }
    }
491559
protected function action($action)
    {
        $action = in_array($action, $this->actions) ? $action : null;
        $action = array_key_exists($action, $this->aliases) ? $this->aliases[$action] : $action;

        return $action;
    }
322901
public function runAction(Action $action)
    {
        $priorAction = $this->_action;
        $this->_action = $action;
        if ($this->beforeAction($action)) {
            if (false === $action->runWithParams($this->getActionParams())) {
                $this->invalidActionParams($action);
            } else {
                $this->afterAction($action);
            }
        }
        $this->_action = $priorAction;
    }
1057216
protected function isActionController($action)
    {
        if ($action instanceof Closure) {
            return false;
        }

        return is_string($action) || is_string(isset($action['uses']) ? $action['uses'] : null);
    }
1324971
protected function _redirect($action)
    {
        $params = $this->controller()->request->params['pass'];
        $searchParams = array_diff_key(
            array_merge(
                $this->controller()->request->query,
                $this->values()
            ),
            array_flip(
                (array)$this->config('prohibitedParams')
            )
        );

        if ($this->config('filterEmptyParams')) {
            $searchParams = array_filter($searchParams);
        }
        $params['?'] = $searchParams;
        $params = array_merge($params, $searchParams);

        $params['action'] = $action;
        $this->controller()->redirect($params);
        $this->controller()->response->send();
        $this->controller()->response->stop();
    }
1078031
protected function runActionMethod($action, $vars = array()) {
		return call_user_func_array(
		    array($this, $action),
            $this->getActionArguments($action, $vars)
        );
	}