Set the request being handled.

@param \Symfony\Component\HttpFoundation\Request $request
@return void
339796
public function setRequest(Request $request)
    {
        $this->request = $request;

        $this->input = $request->request->all() + $request->query->all();
    }
265440
public function init($request)
    {
        $sElementTable = $request->getParameter("elementtable");
        $sShopId = $request->getParameter("shopid");
        $sParentShopId = $request->getParameter("parentshopid");
        $sElementId = $request->getParameter("elementid");
        if ($sElementId) {
            $this->assignElementToSubShop($sElementTable, $sShopId, $sElementId);
        } else {
            $this->assignAllElementsToSubShop($sElementTable, $sShopId, $sParentShopId);
        }
    }
447760
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

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

        $this->gateway->execute(new Sync($payment));

        $status = new GetStatus($payment);
        $this->gateway->execute($status);

        $nextState = $status->getValue();

        $this->updatePaymentState($payment, $nextState);
    }
52969
public function setRequest(Request $request)
    {
        $this->request = $request;
        $this->getContainer()->register('request', $request);
        return $this;
    }
1049589
public function editPermissionsAction(Request $request)
    {
        $context = $this->loadContext($request);

        /** @var \Ekyna\Bundle\UserBundle\Model\GroupInterface $resource */
        $resource = $context->getResource();

        $this->isGranted('EDIT', $resource);

        $cancelPath = $this->generateResourcePath($resource);

        $aclOperator = $this->get('ekyna_admin.acl_operator');
        $builder = $this->createFormBuilder(
            ['acls' => $aclOperator->generateGroupFormDatas($resource)],
            ['admin_mode' => true, '_redirect_enabled' => true]
        );
        $aclOperator->buildGroupForm($builder);

        $form = $builder->getForm();
        $form->add('actions', 'form_actions', [
            'buttons' => [
                'save' => [
                    'type' => 'submit', 'options' => [
                        'button_class' => 'primary',
                        'label' => 'ekyna_core.button.save',
                        'attr' => [
                            'icon' => 'ok',
                        ],
                    ],
                ],
                'cancel' => [
                    'type' => 'button', 'options' => [
                        'label' => 'ekyna_core.button.cancel',
                        'button_class' => 'default',
                        'as_link' => true,
                        'attr' => [
                            'class' => 'form-cancel-btn',
                            'icon' => 'remove',
                            'href' => $cancelPath,
                        ],
                    ],
                ],
            ],
        ]);

        $form->handleRequest($request);
        if ($form->isValid()) {
            try {
                $aclOperator->updateGroup($resource, $form->get('acls')->getData());

                $this->addFlash('Les permissions ont bien été modifiées.', 'success');

                if (null !== $redirectPath = $form->get('_redirect')->getData()) {
                    return $this->redirect($redirectPath);
                }

                return $this->redirect($cancelPath );
            } catch(\Exception $e) {
                $this->addFlash('Erreur lors de la mise à jour des permissions :<br>' . $e->getMessage(), 'danger');
            }
        }

        $this->appendBreadcrumb(
            sprintf('%s-edit-permissions', $this->config->getResourceName()),
            'ekyna_user.group.button.edit_permissions'
        );

        $datas = [
            'permissions' => $aclOperator->getPermissions(),
            'form' => $form->createView(),
        ];

        return $this->render(
            'EkynaUserBundle:Admin/Group:edit_permissions.html.twig',
            $context->getTemplateVars($datas)
        );
    }
505894
public function setRouter($request)
    {
        $this->container->set('request', $request);
        $this->container->make(\Cygnite\Router\Router::class);
        $this->container->get('router')->setRequest($request);
        $this->router = $this->container->get('router');
    }
491819
public function validate(Request $request)
    {
        $options = $request->getParameters();

        $this->ensureAllInRules($options)
             ->ensureValid($options);
    }
123980
public function handleFiles(Request &$request)
    {
        $files = $request->files->all();
        if(!empty($files)) {
            $metadata = $this->handlerService->handleFiles($files);
            $request->headers->add(['file-meta-data' => json_encode($metadata)]);
        }
    }
898114
public function execute($request)
    {
        RequestNotSupportedException::assertSupports($this, $request);

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

        if (in_array($payment->getState(), array(PaymentInterface::STATE_APPROVED, PaymentInterface::STATE_DEPOSITED))) {
            $request->markCaptured();

            return;
        }

        if (in_array($payment->getState(), array(PaymentInterface::STATE_DEPOSITING))) {
            $request->markPending();

            return;
        }

        if (in_array($payment->getState(), array(PaymentInterface::STATE_CANCELED))) {
            $request->markCanceled();

            return;
        }

        if (in_array($payment->getState(), array(PaymentInterface::STATE_EXPIRED))) {
            $request->markExpired();

            return;
        }

        if (in_array($payment->getState(), array(PaymentInterface::STATE_FAILED))) {
            $request->markFailed();

            return;
        }

        if (in_array($payment->getState(), array(PaymentInterface::STATE_NEW, PaymentInterface::STATE_APPROVING))) {
            $request->markNew();

            return;
        }

        $request->markUnknown();
    }
503662
public function run($request)
    {
        $name = get_class($this);
        $verbose = $request->getVar('verbose');

        // Set new logger
        $logger = $this
            ->getLoggerFactory()
            ->getOutputLogger($name, $verbose);
        $this->setLogger($logger);
    }
1320327
public function setRequest(\OxidEsales\PayPalModule\Model\PayPalRequest\PayPalRequest $request)
    {
        $this->setParameters($request->getData());
    }
846877
public function setLang($request)
    {
        if (Auth::check()) {
            $user = Auth::user();

            // Set user locale
            if ($user->locale) {
                $this->setIfAllowed($user->locale);
            } else {
                if (config('localizer.set_auto_lang')) {
                    $this->setIfAllowed(Identify::lang()->getLanguage());
                } else {
                    $this->setIfAllowed(config('localizer.default_lang'));
                }
            }
        } else {
            if ($request->session()->has('locale')) {
                $this->setIfAllowed(session('locale'));
            } else {
                if (config('localizer.set_auto_lang')) {
                    $this->setIfAllowed(Identify::lang()->getLanguage());
                } else {
                    $this->setIfAllowed(config('localizer.default_lang'));
                }
            }
        }
    }
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);
    }
469673
public function register(Request $request)
  {
    $request->rules = $this->rules();
    $request->validate();

    Events::trigger('user.registered', [$user = $this->create($request)]);

    if (Auth::provider($this->provider)::login($user)->status == 'success') {
      $this->sendNotification($user);
      Redirect::to($this->redirectPath(), 200);
    }
  }
1076628
public function setRequest($request = [])
    {
        if (!empty($request)) {
            if (is_array($request)) {
                foreach ((array) $request as $item) {
                    foreach ($item as $key => $value) {
                        if (empty($value)) {
                            $request['empty'] = 'true';
                        } else {
                            $request['empty'] = 'false';
                        }
                    }
                    break;
                }
                $this->_request = $request;

                return $this;
            } else {
                throw new \Exception('Initial request object must be an instance of an array!');
            }
        } else {
            throw new \Exception('An empty request object was given!');
        }
    }
942770
public function setRequest(Request $request)
    {
        $files = $request->files->all();

        $files = is_array($files) ? array_filter($files) : $files;

        $this->initialize(
            $request->query->all(), $request->request->all(), $request->attributes->all(),
            $request->cookies->all(), $files, $request->server->all(), $request->getContent()
        );

        if ($session = $request->getSession()){

            $this->setSession($session);

        }

        $this->setUserResolver($request->getUserResolver());

        $this->setRouteResolver($request->getRouteResolver());
    }
587377
public function execute($request): void
    {
        RequestNotSupportedException::assertSupports($this, $request);

        /** @var PaymentInterface $payment */
        $payment = $request->getModel();
        $details = ArrayObject::ensureArrayObject($payment->getDetails());

        try {
            $request->setModel($details);

            $this->gateway->execute($request);
        } finally {
            $payment->setDetails((array) $details);
        }
    }