doRequest() protected method

Makes a request.
protected doRequest ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request A Request instance
return Symfony\Component\HttpFoundation\Response A Response instance
Esempio n. 1
0
 protected function doRequest($request)
 {
     if ($this->credentials !== null) {
         $request->attributes->set('indieauth.client.token', $this->credentials);
     }
     return parent::doRequest($request);
 }
Esempio n. 2
0
 /**
  * Makes a request.
  *
  * @param Request $request A Request instance
  *
  * @return Response A Response instance
  */
 protected function doRequest($request)
 {
     // avoid shutting down the Kernel if no request has been performed yet
     // WebTestCase::createClient() boots the Kernel but do not handle a request
     if ($this->hasPerformedRequest) {
         $this->kernel->shutdown();
     } else {
         $this->hasPerformedRequest = true;
     }
     return parent::doRequest($request);
 }
Esempio n. 3
0
 /**
  * @param \Symfony\Component\HttpFoundation\Request $request
  */
 protected function doRequest($request)
 {
     if ($this->rebootable) {
         if ($this->hasPerformedRequest) {
             $this->rebootKernel();
         } else {
             $this->hasPerformedRequest = true;
         }
     }
     return parent::doRequest($request);
 }
Esempio n. 4
0
 protected function doRequest($request)
 {
     $services = [];
     if (self::$hasPerformedRequest) {
         $services = $this->persistServices();
         $this->kernel = clone $this->kernel;
     } else {
         self::$hasPerformedRequest = true;
     }
     $this->kernel->boot();
     $container = $this->kernel->getContainer();
     if ($this->kernel->getContainer()->has('profiler')) {
         $container->get('profiler')->enable();
     }
     $this->injectPersistedServices($services);
     return parent::doRequest($request);
 }
Esempio n. 5
0
 /**
  * {@inheritdoc}
  *
  * @param Request $request A Request instance
  *
  * @return Response A Response instance
  */
 protected function doRequest($request)
 {
     // avoid shutting down the Kernel if no request has been performed yet
     // WebTestCase::createClient() boots the Kernel but do not handle a request
     if ($this->hasPerformedRequest) {
         $this->kernel->shutdown();
     } else {
         $this->hasPerformedRequest = true;
     }
     if ($this->profiler) {
         $this->profiler = false;
         $this->kernel->boot();
         $this->kernel->getContainer()->get('profiler')->enable();
     }
     return parent::doRequest($request);
 }