Processes the current request.
It first resolves the request into controller and action,
and then creates the controller to perform the action.
198940
public function processRequest()
    {
        $this->signal->send($this, 'onProcessRequest');

        if (Console::isCli()) {
            $exitCode = $this->_runner->run($_SERVER['argv']);
            if (is_int($exitCode)) {
                $this->end($exitCode);
            }
        } else {
            $this->runController($this->parseRoute());
        }
    }
773931
protected function processResponse()
    {
        if ($this->response->isSuccessful()) {
            $this->updateOrderStatus();
            $this->addTransaction();
            $this->redirectSuccess();
        } else if ($this->response->isRedirect()) {
            $this->response->redirect();
        } else {
            $this->controller->redirect('', $this->response->getMessage(), 'warning', true);
        }
    }
1136884
public function processRequest()
    {
        // Process Jaxon Request
        $jaxon = jaxon();
        if($jaxon->canProcessRequest())
        {
            $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_BEFORE, array($this, 'onEventBefore'));
            $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_AFTER, array($this, 'onEventAfter'));
            $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_INVALID, array($this, 'onEventInvalid'));
            $jaxon->register(Jaxon::PROCESSING_EVENT, Jaxon::PROCESSING_EVENT_ERROR, array($this, 'onEventError'));
            // Traiter la requete
            $jaxon->processRequest();
        }
    }
471524
public function process()
    {
        // Your controller name
        $this->controller = Inflector::classify($this->argument('name')).'Controller';

        // By default we will generate basic controller, if resource set then we will generate
        // REST-ful Resource controller
        $this->setControllerType();

        try {
            $this->makeController();
        } catch (\Exception $e) {
            throw $e;
        }

        $this->info('Controller '.$this->controller.' Generated Successfully By Cygnite Cli.');
    }
1279997
public function processAction() {
        // allow callers to set a targetUrl via the request
        if ($targetUrl = $this->_getSubmittedTargetUrl()) {
            Garp_Auth::getInstance()->getStore()->targetUrl = $targetUrl;
        }

        // never cache the process request
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());
        // This action does not render a view, it only redirects elsewhere.
        $this->_helper->viewRenderer->setNoRender(true);
        $method = $this->getRequest()->getParam('method') ?: 'db';
        $adapter = Garp_Auth_Factory::getAdapter($method);
        $authVars = Garp_Auth::getInstance()->getConfigValues();

        $postData = $this->getRequest()->getPost();
        // Before login hook.
        $this->_beforeLogin($authVars, $adapter, $postData);

        /**
         * Params can come from GET or POST.
         * The implementing adapter should decide which to use,
         * using the current request to fetch params.
         */
        if (!$userData = $adapter->authenticate($this->getRequest(), $this->getResponse())) {
            $this->_respondToFaultyProcess($adapter);
            return;
        }

        $this->_helper->viewRenderer->setNoRender(true);

        // Check if adapter issued a redirect (as is the case with oAuth for instance)
        if ($this->getResponse()->isRedirect()) {
            return;
        }

        if ($userData instanceof Garp_Db_Table_Row) {
            $userData = $userData->toArray();
        }

        // Save user data in a store.
        Garp_Auth::getInstance()->store($userData, $method);

        // Store User role in a cookie, so that we can use it with Javascript.
        if (!Garp_Auth::getInstance()->getStore() instanceof Garp_Store_Cookie) {
            $this->_storeRoleInCookie();
        }

        // Determine targetUrl.
        // This is the URL the user was trying to access before logging in, or a default URL.
        $router = Zend_Controller_Front::getInstance()->getRouter();
        if (!empty($authVars['login']['successRoute'])) {
            $targetUrl = $router->assemble(array(), $authVars['login']['successRoute']);
        } elseif (!empty($authVars['login']['successUrl'])) {
            $targetUrl = $authVars['login']['successUrl'];
        } else {
            $targetUrl = '/';
        }
        $store = Garp_Auth::getInstance()->getStore();
        if ($store->targetUrl) {
            $targetUrl = $store->targetUrl;
            unset($store->targetUrl);
        }

        // After login hook.
        $this->_afterLogin($userData, $targetUrl);

        // Set a Flash message welcoming the user.
        $flashMessenger = $this->_helper->getHelper('FlashMessenger');
        $fullName = new Garp_Util_FullName($userData);
        $successMsg = __($authVars['login']['successMessage']);
        if (strpos($successMsg, '%s') !== false) {
            $successMsg = sprintf($successMsg, $fullName);
        } elseif (strpos('%USERNAME%', $successMsg) !== false) {
            $successMsg = Garp_Util_String::interpolate(
                $successMsg, array(
                'USERNAME' => $fullName
                )
            );
        }
        $flashMessenger->addMessage($successMsg);
        $this->_redirect($targetUrl);
    }
1369908
public function process()
	{
		$view = $this->getView();

		try
		{
			$context = $this->_getContext();
			$basketCtrl = Controller_Frontend_Factory::createController( $context, 'basket' );

			// only start if there's something to do
			if( ( $serviceId = $view->param( 'c-payment-option', null ) ) !== null )
			{
				$serviceCtrl = Controller_Frontend_Factory::createController( $context, 'service' );

				$attributes = $view->param( 'c-payment/' . $serviceId, array() );
				$errors = $serviceCtrl->checkServiceAttributes( 'payment', $serviceId, $attributes );

				foreach( $errors as $key => $msg )
				{
					if( $msg === null ) {
						unset( $errors[$key] );
					}
				}

				if( count( $errors ) === 0 ) {
					$basketCtrl->setService( 'payment', $serviceId, $attributes );
				} else {
					$view->standardStepActive = 'payment';
				}

				$view->paymentError = $errors;
			}


			parent::process();


			// Test if payment service is available
			$services = $basketCtrl->get()->getServices();
			if( !isset( $view->standardStepActive ) && !array_key_exists( 'payment', $services ) )
			{
				$view->standardStepActive = 'payment';
				return false;
			}
		}
		catch( Exception $e )
		{
			$view->standardStepActive = 'payment';
			throw $e;
		}
	}
217025
private function start()
    {
        # Starting session.
        # Here making session active to every request.
        new Session();

        $this->setBaseURL();
        $this->setRequestURI();
        $this->fetchRouteRules();
        $this->establishConnection();
        $this->locateMethod();
        $this->invokeMethod();
    }
493235
public function process()
    {
        parent::process();

        $data = &$this->getForm()->getFormData();

        if (isset($data[$this->id])) {
            $this->clicked = true;
            $this->getForm()->button = $this;
        }
    }
834984
public function process()
    {
        $queue = $this->getQueue();
        $tasks = $this->getTasks();
        foreach ($this->target->getItems() as $targetItem) {
            foreach ($tasks as $task) {
                $action = new QueueAction($this, $this->target, $task[1], $targetItem);
                $queue->send(serialize($action));
            }
        }
    }
788242
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        // Bind the request into the container
        app()->instance(ServerRequestInterface::class, $request);

        // Load the route and routing table.
        $route  = $request->getQueryParams()['route'] ?? '';
        $routes = require 'routes/web.php';

        // Find the routing for the selected route.
        $routing = $routes[$request->getMethod() . ':' . $route] ?? '';

        // This timer gets stopped automatically when we generate the response.
        DebugBar::startMeasure('controller_action');

        // No route matched?
        if ($routing === '') {
            return $handler->handle($request);
        }

        // Routes defined using controller@action
        if (Str::contains($routing, '@')) {
            [$class, $method] = explode('@', $routing);

            $controller = app(self::CONTROLLER_NAMESPACE . $class);

            return app()->dispatch($controller, $method);
        }

        // Routes defined using a request handler
        return app($routing)->handle($request);
    }
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();
        }
    }
180123
public function process()
	{
		$view = $this->getView();
		$context = $this->getContext();

		if( $view->param( 'c_step' ) !== 'process'
			|| $view->get( 'standardErrorList', [] ) !== []
			|| $view->get( 'standardStepActive' ) !== null
		) {
			return;
		}

		try
		{
			$orderCntl = \Aimeos\Controller\Frontend::create( $context, 'order' );
			$basketCntl = \Aimeos\Controller\Frontend::create( $context, 'basket' );


			if ( $view->param( 'cs_order', null ) !== null )
			{
				parent::process();

				$basket = $basketCntl->store();
				$orderItem = $orderCntl->add( $basket->getId(), ['order.type' => 'web'] )->store();

				$context->getSession()->set( 'aimeos/orderid', $orderItem->getId() );
			}
			elseif ( $view->param( 'cp_payment', null ) !== null )
			{
				$parts = \Aimeos\MShop\Order\Item\Base\Base::PARTS_ALL;
				$orderItem = $orderCntl->get( $context->getSession()->get( 'aimeos/orderid' ), false );
				$basket = $basketCntl->load( $orderItem->getBaseId(), $parts, false );
			}
			else
			{
				return;
			}

			$total = $basket->getPrice()->getValue() + $basket->getPrice()->getCosts();
			$services = $basket->getService( \Aimeos\MShop\Order\Item\Base\Service\Base::TYPE_PAYMENT );

			if( $services === [] || $total <= 0 && $this->isSubscription( $basket->getProducts() ) === false )
			{
				$orderCntl->save( $orderItem->setPaymentStatus( \Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED ) );
			}
			elseif( ( $form = $this->processPayment( $basket, $orderItem ) ) !== null )
			{
				$view->standardUrlNext = $form->getUrl();
				$view->standardMethod = $form->getMethod();
				$view->standardProcessParams = $form->getValues();
				$view->standardUrlExternal = $form->getExternal();
				$view->standardHtml = $form->getHtml();

				return;
			}

			$view->standardUrlNext = $this->getUrlConfirm( $view, [], [] );
			$view->standardMethod = 'POST';
		}
		catch( \Aimeos\Client\Html\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Aimeos\Controller\Frontend\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'controller/frontend', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Aimeos\MShop\Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
		}
		catch( \Exception $e )
		{
			$error = array( $context->getI18n()->dt( 'client', 'A non-recoverable error occured' ) );
			$view->standardErrorList = $view->get( 'standardErrorList', [] ) + $error;
			$this->logException( $e );
		}
	}
481041
public function process()
	{
		try
		{
			$view = $this->getView();

			if( ( $id = $view->param( 'sub_id' ) ) != null && $view->param( 'sub_action' ) === 'cancel' ) {
				\Aimeos\Controller\Frontend::create( $this->getContext(), 'subscription' )->cancel( $id );
			}

			parent::process();
		}
		catch( \Exception $e )
		{
			$this->logException( $e );
		}
	}
38805
public function run()
    {
        $request = Request::createFromGlobals();
        $response = $this->handle($request);
        $response->send();

        $this->invokeFinish([], [$this, $request, $response]);
    }
678267
public function Process ()
	{

		// Set redirect path

		$redirect	= isset ($_SERVER['REQUEST_URI'])? strtok ($_SERVER['REQUEST_URI'], '?') : '';

		/**
		 * Action is the last section after the final /
		 * Controller is the path before it
		 */

		// Get the position of the last / in the URL

		$pos			= strrpos ($redirect, '/');

		// Set the action

		$this->action	= substr ($redirect, $pos+1);

		if (!$this->action)
		{
			$this->action	= 'index';
		}

		// Set controller, if there is no / besides the first one then there is no controller

		$controller		= ($pos < 1)? '' : substr ($redirect, 1, $pos-1);

		// If there is a controller
		// Split controller by module and uppercase first character of each module
		// to keep in fitting with the rest of the framework

		if ($controller)
		{

			$arrController	= explode ('/', $controller);

			foreach ($arrController as &$controllerModule)
			{
				$controllerModule	= ucfirst ($controllerModule);
			}

			// Replace / in controller with \ for correct path and set controller

			$this->controller	= join ('\\', $arrController);

		}

	}
687644
public function exec()
    {
        $http = $this->argument('http');
        $controller = $this->argument('controller');
        $method = $this->argument('method');
        //
        $process = Router::target($http, $controller, $method);
        //
        $this->show($process);
    }
548600
public function init()
    {
        $this->_processRequest();

        // storing current view
        $shouldInitialize = $this->shouldInitializeComponents();

        // init all components if there are any
        if ($this->_blLoadComponents) {
            foreach ($this->_getComponentNames() as $componentName => $isNotCacheable) {
                // do not override initiated components
                if (!isset($this->_oaComponents[$componentName])) {
                    // component objects MUST be created to support user called functions
                    $component = oxNew($componentName);
                    $component->setParent($this);
                    $component->setThisAction($componentName);
                    $this->_oaComponents[$componentName] = $component;
                }

                // do we really need to initiate them ?
                if ($shouldInitialize) {
                    $this->_oaComponents[$componentName]->init();

                    // executing only is view does not have action method
                    if (!method_exists($this, $this->getFncName())) {
                        $this->_oaComponents[$componentName]->executeFunction($this->getFncName());
                    }
                }
            }
        }

        parent::init();
    }