@param string $action

@return Response
348171
protected function commit($action)
  {
      $url = $this->is_test() ? self::TEST_URL : self::LIVE_URL;

      $response = $this->parse($this->ssl_post($url, $this->post_data($action)));

      $options = array();
      $options['test'] = $this->is_test();
      $options['authorization'] = $this->authorization_from($response);
      $options['fraud_review'] = $this->fraud_review_from($response);
      $options['avs_result'] = $this->avs_result_from($response);
      $options['cvv_result'] = isset($response['CVV2CODE']) ? $response['CVV2CODE'] : null;

      return $this->build_response($this->success_from($response),
            $this->message_from($response), $response, $options);
  }
1071946
public function getActionResult($action = null)
    {
        $result = $this->results;

        if (!empty($action)) {
            $result = $this->results[$action];
        }

        return $result;
    }
353618
public function doAction($action)
    {
        $controller = $this->getOption('hooks-controller');
        $instance = $this->getControllerInstance($controller);

        if (is_object($instance) && method_exists($instance, $action)) {
            $response = call_user_func([$instance, $action]);
        }

        $this->setAction('');

        return isset($response);
    }
922111
public function addAction(string $action): ClassDeclaration\MethodDeclaration
    {
        $method = $this->method($action . $this->actionPostfix);

        return $method->setAccess(ClassDeclaration\MethodDeclaration::ACCESS_PROTECTED);
    }
1149086
public function getActionStats($action)
    {
        try {
            return $this->pheanstalk->statsTube($action);
        } catch (Exception $exception) {
            if (false !== strpos($exception->getMessage(), 'NOT_FOUND')) {
                return null;
            }

            throw $exception;
        }
    }
408676
public function execute( $action = null, $params = array() ) 
	{
		$this->set_language_alias( $action );
		
		// reset the response
		$this->response = null;
		$this->output = null;
		
		// fix notice
		$return = null;
		 
		if ( is_null( $action ) ) 
		{
			$action = static::$_default_action;
		}
		
		// capture all output made in the controller
		ob_start();
		
		// run wake event
		if ( method_exists( $this, 'wake' ) ) 
		{
			$return = call_user_func_array( array( $this, 'wake' ), $params );
		}
		
		// do we already have an resposne from the wake event?
		if ( !$return instanceof CCResponse )
		{
			// check if we got a custom action handler
			if ( !is_null( static::$_action_handler ) ) 
			{
				$return = call_user_func( array( $this, static::$_action_handler ), $action, $params );
			} 
			// normal action
			else
			{
				// check if the action exists
				if ( method_exists( $this, static::$_action_prefix.$action ) )
				{
					$return = call_user_func_array( array( $this, static::$_action_prefix.$action ), $params );
				}
				else 
				{
					$return = CCResponse::error( 404 );
				}
			}
		}
		
		// get the output
		$this->output = ob_get_clean();
		
		// do we got a response now?
		if ( $return instanceof CCResponse ) 
		{
			$this->response = $return;
		}
		// or a string
		elseif ( !empty( $return ) && is_string( $return ) )
		{
			$this->response = $this->_respond( $return );
		}
		
		// do we got a valid response if not use controller output		
		if ( !$this->response instanceof CCResponse ) 
		{
			$this->response = $this->_respond( $this->output );
		}
		
		// run sleep event
		if ( method_exists( $this, 'sleep' ) ) 
		{
			call_user_func_array( array( $this, 'sleep' ), $params );
		}
		
		// return thaaaaat
		return $this->response;
	}
325982
protected function executeOnError($action)
    {
        $action .= 'OnError';
        if ($this->isCallable($this, $action)) {
            $event_name = $this->getModule()->getName().'.'.$this->getName().'.'.$action;
            $result = $this->getEventManager()->dispatchBefore($event_name, $this);

            if ($result !== false) {
                $result = $this->{$action}();
            }

            if ($result !== false) {
                $result = $this->getEventManager()->dispatchAfter($event_name, $this);
            }

            $result = ($result !== false) ? true : $result;
            return $result;
        }
        
        return null;
    }
744264
public function perPage(string $action = null): string
    {
        return $this->htmlRenderer->perPage($this->request, $action);
    }
1057918
public function setAction($action)
    {
        $result           = false;
        $actionsAvailable = $this->getActionsInfo();
        if (is_array($actionsAvailable) && array_key_exists($action,
                $actionsAvailable)) {
            $this->action = $action;
            $result       = true;
        }
        return $result;
    }
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);
        }
    }
1221633
public function run($action, $request=null) {
		$this->action = $action;
		$this->defaultView = $action;

		if($request === null)
			$request = new Request;
		$this->request = $request;
		$this->response = new Response;
		$this->response->setRequest($this->request);

		#before filters
		$result = null;
		foreach($this->beforeFilters as $filter) {
			if(($result = $filter($this, $request)) !== null)
				break;
		}

		if($result === null) {
			if(($result = $this->before($request)) === null)
				$result = $this->doRun($action, [$request]);
		}

		$this->after($request, $result);

		#after filters
		foreach($this->afterFilters as $filter)
			$filter($this, $request, $result);

		if($result instanceof Response)
			return $result;
		elseif(is_string($result))
			return $this->response->setContent($result);

		return $this->response;
	}
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;
    }
793503
public function setAction(string $action)
    {
        $string = new CamelCase($action);
        $this->action = $string->camelize();
    }
720518
public function markAsAction(Request $request, string $action): Response
    {
        $configuration = $this->requestConfigurationFactory->create($this->metadata, $request);
        $this->isGrantedOr403($configuration, ResourceActions::UPDATE);
        $resource = $this->findOr404($configuration);

        $action = 'markAs' . ucfirst($action);
        $this->messageManager->$action($resource, $this->getUser());

        if (!$configuration->isHtmlRequest()) {
            $view = $configuration->getParameters()->get('return_content', false) ? View::create($resource, Response::HTTP_OK) : View::create(null, Response::HTTP_NO_CONTENT);

            return $this->viewHandler->handle($configuration, $view);
        }

        $this->flashHelper->addSuccessFlash($configuration, ResourceActions::UPDATE, $resource);

        return $this->redirectHandler->redirectToResource($configuration, $resource);
    }
529902
public function next(string $action = null): string
    {
        $this->message = $this->handle($action);

        if ($this->message instanceof Dispatcher)
        {
            return $this->message->next();
        }

        $response = $this->message;

        if (!($response instanceof MessageInterface))
        {
            $stream   = $this->factory->stream->createStream($response);
            $response = $this->message()->withBody($stream);
        }

        $this->setMessage($response);

        return (string)$this;
    }
876947
public function handleAction($action, $actionParams)
    {
        $response = new b8\Http\Response\JsonResponse();
        try {
            $data = parent::handleAction($action, $actionParams);
            if (isset($data['responseCode'])) {
                $response->setResponseCode($data['responseCode']);
                unset($data['responseCode']);
            }
            $response->setContent($data);
        } catch (Exception $ex) {
            $response->setResponseCode(500);
            $response->setContent(array('status' => 'failed', 'error' => $ex->getMessage()));
        }
        return $response;
    }
377396
protected function post_data($action)
  {
      $this->post['METHOD'] = $action;
      $this->post['VERSION'] = $this->version;
      $this->post['PWD'] = $this->options['password'];
      $this->post['USER'] = $this->options['login'];
      $this->post['SIGNATURE'] = $this->options['signature'];

      return $this->urlize($this->post);
  }