@param Request $request
@param object $processor

@return void
346585
protected  function requestFilter(Request $request, $processor)
    {
        /** @var RequestFilter $requestFilter */
        $requestFilter = $this->getContainer()->get(Config::getServiceName());

        $requestFilter->process($request, $processor);
    }
241548
public function process($processor) {
        if (!$processor instanceof base_processor) { // No correct processor, throw exception
            throw new base_element_struct_exception('incorrect_processor');
        }

        $iterator = $this->get_iterator($processor); // Get the iterator over backup-able data

        $itcounter = 0; // To check that the iterator only has 1 ocurrence
        foreach ($iterator as $key => $values) { // Process each "ocurrrence" of the nested element (recordset or array)

            // Fill the values of the attributes and final elements with the $values from the iterator
            $this->fill_values($values);

            // Delegate the process of each final_element
            foreach ($this->get_final_elements() as $final_element) {
                $final_element->process($processor);
            }

            // Everything processed, clean values before next iteration
            $this->clean_values();

            // Increment counters for this element
            $this->counter++;
            $itcounter++;

            // optigroup_element, check we only have 1 element always
            if ($itcounter > 1) {
                throw new base_element_struct_exception('optigroup_element_only_one_ocurrence', $this->get_name());
            }
        }
        // Close the iterator (DB recordset / array iterator)
        $iterator->close();
    }
657091
public function setRequest(Request $request)
    {
        $this->issuer->setRequest($request);
        $this->checker->setRequest($request);
    }
964766
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        //$model = ArrayObject::ensureArrayObject($request->getModel());

        $this->gateway->execute(new PaymentResponse($request->getModel()));
    }
884688
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $operation = $this->getOperation($request);

        foreach ($operation->getParameters() as $parameter) {
            $name    = $parameter->getName();
            $request = $request->withAttribute(
                $name,
                $this->processorBuilder
                    ->build($this->getOperation($request)->getParameter($name)->getSchema())
                    ->hydrate($request->getAttribute($name))
            );
        }

        return $delegate->process($request);
    }
574634
public function execute($request)
    {
        $logger = $GLOBALS['logger'];

        try {
            parent::execute($request);
        } catch(AuthenticationException $ex) {
            $logger->error('Unauthorized attempt to access resource, being redirected to home page', array($ex->getMessage()));
            $this->_handleUnauthenticatedAccess();
            $this->_response->send();
        }
    }
819828
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        if (null !== ($data = $request->getAttribute(CommandDispatcher::ATTRIBUTE))) {
            $operation = $this->getOperation($request);
            $schema    = $operation
                ->getResponse($this->okStatusResolver->resolve($data, $operation))
                ->getSchema();

            $request = $request->withAttribute(
                CommandDispatcher::ATTRIBUTE,
                $this->processorBuilder->build($schema)->dehydrate($data)
            );
        }

        return $delegate->process($request);
    }
240352
public function setRequest(Request $request = null)
    {
        $this->request = $request;
        // try to set User-Agent from original request
        if ($request && $this->browser) {
            $this->browser->setDefaultHeaders([
                'User-Agent' => $request->server->get('HTTP_USER_AGENT', self::DEFAULT_USER_AGENT),
            ]);
        }
    }
1359845
public function run(Request $request) {
		$page = $this->getServiceContainer()->getKernel()->getApplication()->getPage();
		$page->setTitle($this->getServiceContainer()->getTranslator()->trans('registration'));

		if ($request->isMethod('POST')) {
			$post = $request->request;
			$prefs = $this->getServiceContainer()->getPreferenceLoader()->getSystemPreferences();
			$translator = $this->getServiceContainer()->getTranslator();

			// check errors first
			$errors = [];

			// username
			if ($prefs->getUserLogin() == SystemPreferences::LOGIN_USERNAME && !$post->has('user-name')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('user_name')
				]);
			}

			// email
			$emailRequired = $prefs->getUserEmail()
				|| $prefs->getUserLogin() == SystemPreferences::LOGIN_EMAIL
				|| $prefs->getUserLogin() == SystemPreferences::LOGIN_USERNAME_EMAIL;

			if ($emailRequired && !$post->has('email')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('email')
				]);
			}

			// given name
			if ($prefs->getUserNames() == SystemPreferences::VALUE_REQUIRED && !$post->has('given-name')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('given_name')
				]);
			}

			// family name
			if ($prefs->getUserNames() == SystemPreferences::VALUE_REQUIRED && !$post->has('family-name')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('family_name')
				]);
			}

			// birth
			if ($prefs->getUserBirth() == SystemPreferences::VALUE_REQUIRED && !$post->has('birth')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('birth')
				]);
			}

			// sex
			if ($prefs->getUserSex() == SystemPreferences::VALUE_REQUIRED && !$post->has('sex')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('sex')
				]);
			}

			// passwords
			if (!$post->has('password') && !$post->has('password_confirm')) {
				$errors[] = $translator->trans('error.required', [
					'field' => $translator->trans('password')
				]);
			}

			if ($post->get('password') != $post->get('password_confirm')) {
				$errors[] = $translator->trans('error.password_nomatch');
			}


			$vars = ['failures' => $errors, 'fields' => $post->all()];
			if (count($errors) == 0) {
				$serializer = User::getSerializer();
				$fields = $serializer->getFields();
				$attribs = [
					'password' => $post->get('password')
				];

				foreach ($fields as $field) {
					if ($post->has($field)) {
						$attribs[$field] = $post->get($field);
					}
				}

				$domain = new UserDomain($this->getServiceContainer());
				$payload = $domain->create(['attributes' => $attribs]);
				if ($payload instanceof NotValid) {
					$payload = new NotValid(array_merge($payload->get(), $vars));
				} else if ($payload instanceof Created) {
					$user = $payload->getModel();

					// send mail
					$prefs = $this->getServiceContainer()->getPreferenceLoader()->getSystemPreferences();
					$localeService = $this->getServiceContainer()->getLocaleService();
					$file = $localeService->findLocaleFile('/keeko/account/locales/{locale}/mail/registration.twig');
					$body = $this->render($file, [
						'user' => $user->getDisplayName(),
						'username' => $user->getUserName(),
						'plattform' => $prefs->getPlattformName(),
					]);

					$mailer = $this->getServiceContainer()->getMailer();
					$message = $this->getServiceContainer()->createMessage();
					$message->setTo($user->getEmail());
					$message->setSubject($translator->trans('registration.subject', [
						'plattform' => $prefs->getPlattformName()
					]));
					$message->setBody($body);
					$mailer->send($message);
				}
			} else {
				$post->remove('password');
				$post->remove('password_confirm');
				$payload = new NotValid($vars);
			}
		} else {
			$payload = new Blank();
		}

		return $this->responder->run($request, $payload);
	}
1373558
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $operation = $this->getOperation($request);

        foreach ($this->parameterAssembler->getRequestParameters($request, $operation) as $name => $value) {
            $request = $request->withAttribute($name, $value);
        }

        return $delegate->process($request);
    }
1198739
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

        /** @var PaymentInterface $payment */
        $payment = $request->getSource();

        /** @var OrderInterface $order */
        $params = [
            'payment_id' => $payment->getNumber(),
            'payment_amount' => $payment->getTotalAmount(),
            'payment_currency' => $payment->getCurrencyCode(),
            'project_id' => $this->api['projectId'],
            'customer_id' => $payment->getClientId(),
        ];
        $request->setResult($params);
    }
809071
public function execute($request)
    {
        ob_start();
        $logger          = $GLOBALS['logger'];
        $this->_request  = $request;
        $this->_response = new HttpResponse();
        try {
            WebSessionManager::updateActiveSession();
            foreach ($this->_preProcessors as $preProcessor) {
                $preProcessor->process($this->_request);
            }

            $functionToCall = $this->command->getFunction();
            if (empty($functionToCall) === true) {
                $functionToCall = 'default';
            }

            if (!is_callable(array(&$this,'_'.$functionToCall))) {
                $functionToCall = 'error';
            }

            call_user_func(array(&$this,'_'.$functionToCall), $this->_request);
            foreach ($this->_postProcessors as $postProcessor) {
                $postProcessor->process($this->_response);
            }

            ob_end_clean();
            if (empty($this->_response)) {
                $this->_response = new HttpResponse(); 
            }

            if($this->_response->getEncoding() == null) {
                $responseMode = $this->_request->getParam('mode');
                if ($responseMode === 'ui') {
                    $this->_response->setEncoding('html');
                } else if ($responseMode === 'data') {
                    $this->_response->setEncoding('json');
                }
            }
            $this->_response->send();
        } catch (ServiceException $se) {
            $this->_response = new HttpResponse();
            $response->addHeader('HTTP/1.1 400 Bad Request');
            $this->_response->send();
        } catch(BadResponseException $bre) {
            $renderer = new TwigRenderer('500.html');
            if($renderer->exists()) {
                $this->_response = new HttpResponse('none', $renderer);
            } else 
                $this->_response = new HttpResponse();
            $response->addHeader('HTTP/1.1 500 Internal Server Error');
            $this->_response->send();
        }//end try

    }
554244
public function setRequest( Request $request )
	{
		$this->request = $request;

		$this->cachedRoot = null;
		$this->cachedSchema = null;
	}
160914
public function process(Request $request, Response $response)
    {
        // Conditionally add jQuery
        $this->addJquery($request, $response);

        /** @var FileAssetInterface $asset */
        foreach ($this->sort($this->javascript) as $key => $asset) {
            $this->processAsset($asset, $request, $response);
            unset($this->javascript[$key]);
        }

        /** @var FileAssetInterface $asset */
        foreach ($this->sort($this->stylesheet) as $key => $asset) {
            $this->processAsset($asset, $request, $response);
            unset($this->stylesheet[$key]);
        }
    }
761921
public function run(&$request)
    {
        $this->detect($request);
        $request = $this->driver->formatIncomingRequest($request);
    }
672463
public function process(ServerRequestInterface $request, DelegateInterface $delegate)
    {
        $this->response = $delegate->process($request);
        $action = $this->action;

        return $action();
    }
936570
public function handle(Request $request, JsonRpcServer $server)
    {
        if (array_key_exists('smd', $request->all())) {
            $server->setResponse((new SmdGenerator($server))->get()->toArray());

            return false;
        }

        return true;
    }