Runs this action with the specified parameters.
This method is mainly invoked by the controller.

@param  array $params action parameters
@return mixed the result of the action
776581
public function runWithParams($params)
    {
        $args = $this->controller->bindActionParams($this, $params);
        Log::debug('Running action: ' . get_class($this->controller) . '::' . $this->actionMethod . '()' . __METHOD__);
        if (Zilf::$app->requestedParams === null) {
            Zilf::$app->requestedParams = $args;
        }

        return call_user_func_array([$this->controller, $this->actionMethod], $args);
    }
603064
public static function fromSuccess(array $params)
    {
        $matchResult = new self();
        $matchResult->type = 'success';
        $matchResult->params = $params;
        return $matchResult;
    }
1293222
public function execute(array $params = []) : array
    {
        foreach ($params as $paramName => $paramValue) {
            $type = is_int($paramValue) ? \PDO::PARAM_INT : \PDO::PARAM_STR;
            $this->getStatement()->bindValue($paramName, $paramValue, $type);
        }
        $this->getStatement()->execute();

        return $this->getStatement()->fetchAll(\PDO::FETCH_ASSOC);
    }
776464
public function run($action = null, $params = [])
    {
        $this->action = $action;
        $this->params = $params;

        /*
         * Check security token.
         */
        if (!$this->verifyCsrfToken()) {
            return Response::make(Lang::get('backend::lang.page.invalid_token.label'), 403);
        }

        /*
         * Check forced HTTPS protocol.
         */
        if (!$this->verifyForceSecure()) {
            return Redirect::secure(Request::path());
        }

        /*
         * Determine if this request is a public action.
         */
        $isPublicAction = in_array($action, $this->publicActions);

        /*
         * Check that user is logged in and has permission to view this page
         */
        if (!$isPublicAction) {

            /*
             * Not logged in, redirect to login screen or show ajax error.
             */
            if (!BackendAuth::check()) {
                return Request::ajax()
                    ? Response::make(Lang::get('backend::lang.page.access_denied.label'), 403)
                    : Backend::redirectGuest('backend/auth');
            }

            /*
             * Check access groups against the page definition
             */
            if ($this->requiredPermissions && !$this->user->hasAnyAccess($this->requiredPermissions)) {
                return Response::make(View::make('backend::access_denied'), 403);
            }
        }

        /*
         * Extensibility
         */
        if ($event = $this->fireSystemEvent('backend.page.beforeDisplay', [$action, $params])) {
            return $event;
        }

        /*
         * Set the admin preference locale
         */
        BackendPreference::setAppLocale();
        BackendPreference::setAppFallbackLocale();

        /*
         * Execute AJAX event
         */
        if ($ajaxResponse = $this->execAjaxHandlers()) {
            return $ajaxResponse;
        }

        /*
         * Execute postback handler
         */
        if (
            ($handler = post('_handler')) &&
            ($handlerResponse = $this->runAjaxHandler($handler)) &&
            $handlerResponse !== true
        ) {
            return $handlerResponse;
        }

        /*
         * Execute page action
         */
        $result = $this->execPageAction($action, $params);

        if (!is_string($result)) {
            return $result;
        }

        return Response::make($result, $this->statusCode);
    }
402028
public function invokeAction(array $params)
    {
        if (!$this->inited) {
            throw new \wf\app\web\Exception('请在'.get_called_class().'::__construct()调用parent::__construct()');
        }

        $action = $this->act . 'Action';

        if(!method_exists($this, $action)) {
            throw new \wf\app\web\NotFoundException;
        }

        // 执行方法
        //call_user_func_array(array($this, $action), $params);
        $method = new \ReflectionMethod($this, $action);
        if (!$method->isPublic()){
            // note：ReflectionException为“Fatal error”，不可捕获，不在这里抛出，也不直接在上一级异常中捕获而不用这个异常抛出
            // 否则不能在上一级异常处理中捕获，而直接到顶级异常处理中
            throw new \wf\app\web\NotFoundException;
        }

        $method->invokeArgs($this, $params); // 在这里加断点，下一步将进入当前请求的控制器业务逻辑中
    }
1220823
public function search($params)
    {
        $searchResult = $this->getRequest()->request(
            'POST',
            $this->getRequestUrl('searches'),
            $this->getSearchQuery($params)
        );

        return $this->getInputsFromSearchResult($searchResult);
    }
752986
public function execute(array $params = null)
    {
        $this->bindParams($params);
        $this->formatSqlByParams($params);
        $result = $this->stmt->execute();

        if ($result !== true) {
            throw new MysqlException('Sync mysql execute error，sql=' . $this->stmt->debugDumpParams());
        }
        $this->pushSqlToStack($this->sql);

        return $result;
    }
628982
protected function runCommand(\Parable\Console\Command $command, array $parameters = [])
    {
        $parameter = new \Parable\Console\Parameter();
        $parameter->setParameters($parameters);

        $command->prepare($this->app, $this->output, $this->input, $parameter);

        return $command->run();
    }
403818
public function execute($params)
    {
        $this->method = array_shift($params);
        $this->prepare($params);

        return $this->httpClient
            ->setMethod('post')
            ->setEndPoint(static::ENDPOINT.$this->method.'/')
            ->authHeaders()
            ->addHeader([ 'Content-Type' => 'application/json' ])
            ->setParams($this->params)
            ->send();
    }
208105
public function run(array $parameters)
    {
        $process = new Process(array_merge(['bin/console'], $parameters));
        $process->setTimeout(null);
        $process->setWorkingDirectory($this->kernel->getProjectDir());

        $exitCode = $process->run();

        if ($exitCode) {
            $error = $process->getErrorOutput();
            $this->logger->error($error);
        }
    }
51167
public function call($params)
    {
        //Prevent user forgetting connect with the ERP.
        $this->autoConnect();

        $args = array_merge(
            [$this->db, $this->uid, $this->password],
            func_get_args()
        );

        return collect(call_user_func_array([$this->object,'execute_kw'], $args));
    }
471404
public function execute(array $params = []) : array
    {
        foreach ($params as $paramName => $paramValue) {
            $type = is_int($paramValue) ? \SQLITE3_INTEGER : \SQLITE3_TEXT;
            $this->getStatement()->bindValue($paramName, $paramValue, $type);
        }
        $result = $this->getStatement()->execute();

        $results = [];
        while ($row = $result->fetchArray(\SQLITE3_ASSOC)) {
            $results[] = $row;
        }

        return $results;
    }
738718
public function execute(array $params = []) : Result
    {
        $params = array_replace($this->parameters, $params);

        if (
            empty($this->fields)
            && empty($this->avgAggregate)
            && empty($this->countAggregate)
            && empty($this->minAggregate)
            && empty($this->maxAggregate)
            && empty($this->sumAggregate)
        ) {
            $this->fields = ['*'];
        }

        return $this->connection->select($this, $params);
    }
393547
public function run($parameters = array()) {

        // Grab a process ID for a new forked process
        $this->pid = \pcntl_fork();

        if (!$this->pid) {
            $this->process($parameters);
            posix_kill(getmypid(), 9);
        }

        return $this->pid;
    }
693594
protected function call(array $params)
    {
        $response = $this->client->get(null, array('query' => $params));

        $result = $response->json();

        if ($result['result'] == 'ERR') {
            throw new ResponseException($result['message'], $result['code']);
        }

        return $result;
    }
627558
public function setParams(array $params)
    {
        foreach ($this->params as $param) {
            if (!array_key_exists($param, $params)) {
                $methodName = 'unset'.ucfirst($param);

                if (method_exists($this, $methodName)) {
                    call_user_func(
                        [$this, $methodName]
                    );
                    continue;
                }
            }

            if (property_exists($this, $param)) {
                $methodName = 'set'.ucfirst($param);

                if (method_exists($this, $methodName)) {
                    call_user_func(
                        [$this, $methodName],
                        $params[$param]
                    );
                }
            }
        }

        return $this;
    }
1022598
public function execute($requestParams = array()){

        $this->getQueryBuilder()->setBulkInsert($requestParams);
       
        $query = $this->getQueryBuilder()->getQuery($this->entity, QueryBuilder::SAVE_QUERY, QueryBuilder::PARENT_ONLY);

        $this->beginTransaction();
        try{
            $result = $this->query("$query", FALSE);
      
            $this->commitTransaction();
        }catch(Exception $e){
          
            error_log($e->getMessage());
            $this->rollbackTransaction();
        }
        if(array_key_exists('locale', $requestParams)) {
            $requestParams['locale'] = $this->parseJson($requestParams['locale']);
        }
      
        return array(get_class($this->entity) => $requestParams);
    }