Processes the API by calling the execute method on the router.

@return $this The current object.
777757
public function process()
    {
        // Check if we should verify the request
        if ($this->configuration->getUseAuthorization()) {
            if (
                $this->uri != '/token' &&
                $this->uri != '/authorize' &&
                !$this->tokenServer->verifyResourceRequest(\OAuth2\Request::createFromGlobals())
            ) {
                // Get the data as json and convert it to an array,
                // - so we can set our own response type.
                $data = $this->tokenServer->getResponse()->getResponseBody('json');
                $data = json_decode($data, true);

                // Set the response, status code and output content setting final output to true
                $this->response = $data;
                $this->statusCode = $this->tokenServer->getResponse()->getStatusCode();
                $this->output(true);
                return $this;
            }
        }

        try {
            // Handle OPTIONS requests
            if ($this->method == 'options') {
                $this->handleOptionsRequest();
            } else {
                // Execute the router
                $this->router->execute();
            }
        } catch (\Exception $e) {
            // Set the response and status code to error
            $this->response = ['error' => 1, 'message' => $e->getMessage()];
            $this->statusCode = 500;
        }

        // Output the response
        $this->output();
    }
618224
public function process()
	{
		// Get this request's data.
		$this->parseRequest();

		// Perform logic.
		$this->execute();

		// Parse the result of our business logic.
		$this->parseResult();

		// Build the Response utilizing status, type, body, etc.
		$this->buildResponse();

		// Finally, return the Response.
		return $this->respond();
	}
642495
public function execute()
    {
        if ($this->order !== null) {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Orders::PATH, $this->order->getId(), self::PATH);
        } else {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Multiorders::PATH, $this->multiorder->getId(), self::MULTI_PAYMENTS_PATH);
        }

        $response = $this->httpRequest($path, Requests::POST, $this);

        return $this->populate($response);
    }
295892
public function execute()
    {
        // Build the previously set data
        $this->networkCtx->setApiCtxData(
            $this->requestCtx
        );

        // Send the request
        $this->networkCtx->sendRequest();

        // Set the request context
        $this->responseCtx->setRequestCtx(
            $this->requestCtx
        );

        // Parse the response
        $this->responseCtx->parseResponse(
            $this->networkCtx->getResponseBody()
        );
    }
845090
public function executeAction()
    {
        $this
            ->bankwireManager
            ->processPayment();

        $redirectUrl = $this
            ->urlGenerator
            ->generate(
                $this->successRedirectionRoute->getRoute(),
                $this->successRedirectionRoute->getRouteAttributes(
                    $this->paymentBridge->getOrderId()
                )
            );

        return new RedirectResponse($redirectUrl);
    }
480860
public function process()
    {
        if (!$this->canRun(false)) {
            return $this;
        }
        $this->runNow(!$this->isAlwaysTask());
        return $this;
    }
621234
public function process() {
		$route = $this->findFirstMatchingRoute();
		if( !$route ) {
			// Not found, look for an alternative (with /)
			$route = $this->findFirstMatchingRoute(true);
			if( $route ) {
				// Alternative found, try to redirect to this one
				$r = $this->redirect($route);
				if( $r ) {
					// Redirect
					return $r;
				}
				// Unable to redirect, throw not found
				$route = null;
			}
		}
		return $this->processRoute($route);
	}
790085
public function execute()
    {
        $request = $this->get('request');
        $router = $this->get('router');
        $response = $this->get('response');

        // Attempt to match the requested route with a registered route
        if ($router->matchRequest($request->route(), $request->httpMethod())) {

            // A match was found - pass any route params to the Request instance
            $request->routeParams($router->params());

            // The closure associated with the matched route
            $closure = $router->getClosure($this);

            // Attempt to call the closure
            if ($closure) {
                // Call the output
                $closure($request, $response);
            } else {
                // There was a problem calling the route's closure
                $response->send(500, 'This route\'s callback is invalid.');
            }

        } else {

            // A route wasn't matched - return a 404
            $response->send(404, 'The requested resource was not found.');
        }
    }
330389
public function process()
    {
        try {
            $this->processAlias();
            $this->processRoute();
            $this->output404();
        } catch (Exception $ex) {
            trigger_error($ex->getMessage());
            $this->response->outputError500();
        }
    }
711944
protected function _process()
    {
        if ($this->__isProcessed === true) {
            return $this;
        }

        $limit = $this->getLimit();
        if (is_null($limit)) {
            $this->setPagesNumber(1);
            $this->setOffset(0);
        } else {
            $this->setPagesNumber(round($this->getItemsNumber() / $this->getLimit()));
        }

        $this->__isProcessed = true;
        return $this;
    }
719037
public function processes()
    {
        if (is_null($this->processRequests)) {
            $this->processRequests = new ProcessRequests($this->client);
        }

        return $this->processRequests;
    }
646054
public function call() {
        $request = $this->createRequest();
        $response = $this->api->execute($request, $this);
        $this->response = $response;

        if ($this->shouldResponseBeProcessed($response)) {
            $instance = $this->api->instantiateResult($response, $this);

            return $instance;
        }
        return $response;
    }
1063141
public function performRoute()
    {
        $this->invokePluginsHook(
            'beforeServiceSelected',
            array($this, $this->getRequest())
        );

        /* Check if we can get the service. */
        try {
            $service = $this->getServiceProvider()->getServiceInstance(
                $this->getRequest()->getController()
            );
        } catch (Exception $e) {
            throw new ResourceNotFoundException(
                'No such service: '.$this->getRequest()->getController()
            );
        }

        /* Loop through each call in the possible batch. */
        $response = array();
        foreach ($this->requests as $request) {
            $callResponse = $this->invokeMethod($service, $request);

            /* Stop here if this isn't a batch. There is only one response. */
            if (false === $this->batch) {
                $response = $callResponse->getResponseObject();
                break;
            }

            /* Omit empty responses from the batch response. */
            if ($callResponse = $callResponse->getResponseObject()) {
                $response[] = $callResponse;
            }
        }

        @header('Content-type: application/json');
        $response = new Response($response);
        return $this->getEncoder()->encode($response);
    }
186789
public function process()
    {
        if ($this->cache !== null) {
            return $this->cache;
        } else {
            return ($this->cache = UriTemplate::expand($this->template, $this->data));
        }
    }
105973
public function start()
    {
        $this->beforeStart();

        // Begin output buffering and begin building the HTTP response
        $this->isBuffering = true;
        ob_start();

        $this->response = new Response();
        $this->context->registerInstance($this->response);

        try {
            // Dispatch the request to the router
            if (!$this->filters->trigger(Filters::BEFORE_ROUTE, $this->context)) {
                return $this->response;
            }

            $routingResult = $this->router->route($this->request);

            if ($routingResult != null) {
                $this->context->registerInstance($routingResult);
                $this->response->setResponseCode(ResponseCode::HTTP_OK);

                $returnValue = $this->dispatch($routingResult);

                // If a Response object was returned by the target code, use that object from now on
                if ($returnValue instanceof Response) {
                    if ($this->isBuffering) {
                        ob_clean();
                    }

                    $this->response = $returnValue;
                }
            } else {
                $anyOptionsAvailable = $this->router->getOptions($this->request);

                if (!$anyOptionsAvailable) {
                    // No options at all for this route, this is a true 404
                    $this->prepareNotFoundResponse();
                } else if ($this->request->getMethod() == RequestMethod::OPTIONS) {
                    // Options available, no custom OPTIONS handler, generate an OPTIONS ("Allow") response.
                    $this->prepareOptionsResponse();
                } else {
                    // There are options, but no match, this is a 405
                    $this->prepareNotAllowedResponse();
                }
            }

            $this->filters->trigger(Filters::AFTER_ROUTE, $this->context);
        } catch (\Exception $ex) {
            $this->prepareErrorResponse($ex);
        } finally {
            $this->sendResponse();
        }

        return $this->response;
    }
1356702
public function process(){
		$this->log->add('Request Received from: '.server('REMOTE_ADDR'));
		$encoding = $this->decode($this->request);
		if($encoding != self::ENC_RAW)
			$this->log->add('Parsed Request: '.print_r($this->request,true));
		return $this;
	}
1328534
protected function run()
    {
        // First convert via subrouting defined routes to a parsable array tree
        $this->setRouteTree(explodeTree($this->getRoutes(), self::ROUTE_SEPARATOR));

        // Retrieve route configuration via match by current request URL ;)
        $routeConfig = $this->getRouteByUrl($this->getStateObject()->getUrl());

        // Real processed request method depends on the override header if set. Otherwise normal request type is used
        $headers = $this->getStateObject()->getHeaders();

        // Override set? and is allowed for the resource? Sometimes clients are not able to e.g. tunnel PUT, DELETE ...
        if (isset($headers['X_HTTP_METHOD_OVERRIDE']) === true && $routeConfig->getOverride() === true) {
            $requestMethod = $headers['X_HTTP_METHOD_OVERRIDE'];

            // Inject into object we use as base -> update :)
            $this->getStateObject()->setMethod($requestMethod);
        } else {
            $requestMethod = $this->getStateObject()->getMethod();
        }

        // Request method should not be processed.
        if ($routeConfig->isAllowed($requestMethod) === false) {
            throw new Doozr_Base_Presenter_Rest_Exception(
                'Method "'.$this->getStateObject()->getMethod().'" not allowed.',
                405
            );
        }

        // Missing argument + message
        if ($this->validateInputArguments(
                $routeConfig->getRequired(),
                $this->getStateObject()->getQueryParams()
            ) !== true
        ) {
            $missingArguments = [];

            foreach ($routeConfig->getRequired() as $key => $value) {
                if (array_key_exists($key, $this->getStateObject()->getQueryParams()->getArray()) === false) {
                    $missingArguments[] = $key.(($value !== null) ? ' => '.$value : '');
                }
            }

            throw new Doozr_Base_Presenter_Rest_Exception(
                'Missing required argument'.((count($missingArguments) > 1) ? 's' : '').': '.
                implode(',', $missingArguments),
                406
            );
        }

        // Try to get data and check if authorization required and failed
        $data = $this->getModel()->getData(
            $this->getStateObject(), $routeConfig
        );

        // Retrieve data from model so that VIEW and MODEL are informed (Observer and this here is the Subject)
        $this->setData(
            $data
        );
    }