Bind current request.

@param Request $request
12677
public function bindRequest(Request $request)
    {
        $query = $request->query;
        $session = $request->getSession();

        $adminListName = 'listconfig_' . $request->get('_route');

        $this->page = $request->query->getInt('page', 1);
        $this->limit = $request->query->getInt('limit', $this->getLimitOptions()[0]);

        $adminListSessionData = $request->getSession()->get($adminListName);
        if (!$query->has('limit') && null !== $adminListSessionData && isset($adminListSessionData['limit'])) {
            $this->limit = $adminListSessionData['limit'];
        }

        if ($request->query->has('limit') && !$request->query->has('page')) {
            $this->page = 1;
        }

        // Allow alphanumeric, _ & . in order by parameter!
        $this->orderBy = preg_replace('/[^[a-zA-Z0-9\_\.]]/', '', $request->query->get('orderBy', ''));
        $this->orderDirection = $request->query->getAlpha('orderDirection', '');

        // there is a session and the filter param is not set
        if ($session->has($adminListName) && !$query->has('filter')) {
            if (!$query->has('page') && !$query->has('limit')) {
                $this->page = $adminListSessionData['page'];
            }

            if (!$query->has('orderBy')) {
                $this->orderBy = $adminListSessionData['orderBy'];
            }

            if (!$query->has('orderDirection')) {
                $this->orderDirection = $adminListSessionData['orderDirection'];
            }
        }

        // save current parameters
        $session->set(
            $adminListName,
            [
                'page' => $this->page,
                'limit' => $this->limit,
                'orderBy' => $this->orderBy,
                'orderDirection' => $this->orderDirection,
            ]
        );

        // Remove limit from query param so it doesn't affect the session of the filter builder
        $request->query->remove('limit');
        $this->getFilterBuilder()->bindRequest($request);
    }
578478
public function execute (Request $request)
		{
			$parsed = $this->parseRouteRequest($request);

			$controller = $this->getController($request);

			return $controller->dispatch(
				$parsed['method'],
				$parsed['arguments']
			);
		}
1101915
public function prepareRequest(Request $request)
	{
		$this->ch = curl_init();
		curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
		curl_setopt($this->ch, CURLOPT_HEADER, true);
		if ($auth = $request->getUserAndPass()) {
			curl_setopt($this->ch, CURLOPT_USERPWD, $auth);
		}
		curl_setopt($this->ch, CURLOPT_URL, $request->getUrl());

		$options = $request->getOptions();
		if (!empty($options)) {
			curl_setopt_array($this->ch, $options);
		}

		$method = $request->getMethod();
		curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));

		curl_setopt($this->ch, CURLOPT_HTTPHEADER, $request->formatHeaders());

		if ($request->hasData()) {
			curl_setopt($this->ch, CURLOPT_POSTFIELDS, $request->encodeData());
		}

		if ($method === 'head') {
			curl_setopt($this->ch, CURLOPT_NOBODY, true);
		}
	}
907329
protected static function currentRequest(HTTPRequest $request = null)
    {
        // Ensure we only use a registered HTTPRequest and don't
        // incidentally construct a singleton
        if (!$request && Injector::inst()->has(HTTPRequest::class)) {
            $request = Injector::inst()->get(HTTPRequest::class);
        }
        return $request;
    }
802502
private static function fillCurrentRouteString(self $request)
    {
        //Read data from $_SERVER array
        $requestUri = urldecode($_SERVER['REQUEST_URI']);
        $scriptName = $_SERVER['SCRIPT_NAME'];

        //Extract route string from the URI
        $length = strlen(dirname($scriptName));
        $routeAux = substr(explode('?', $requestUri)[0], $length);
        $route = '/';

        if ($routeAux && $routeAux != '/') {
            $route .= trim(str_replace('\\', '/', $routeAux), '/').'/';
        }

        $request->setRouteStr($route);
    }
557901
public function setRequest($request)
    {
        $return = parent::setRequest($request);
        $this->setURLParams($this->getRequest()->allParams());

        return $return;
    }
87197
protected function bindPathParameters($request)
    {
        $path = '/'.ltrim($request->decodedPath(), '/');

        preg_match($this->route->compiled->getRegex(), $path, $matches);

        return $this->matchToKeys(array_slice($matches, 1));
    }
1105597
public function add($request)
    {
        $this->onBefore($request);
        array_push($this->_requests, $request);
        curl_multi_add_handle($this->_mh, $request->curl);
        $this->_updated = true;
    }
1271289
public function bindRequest(Request $request)
    {
        $query = $request->query;
        $session = $request->getSession();

        $adminListName = 'listconfig_'.$request->get('_route');

        $this->page = $request->query->getInt('page', 1);
        // Allow alphanumeric, _ & . in order by parameter!
        $this->orderBy = preg_replace('/[^[a-zA-Z0-9\_\.]]/', '', $request->query->get('orderBy', ''));
        $this->orderDirection = $request->query->getAlpha('orderDirection', '');

        // there is a session and the filter param is not set
        if ($session->has($adminListName) && !$query->has('filter')) {
            $adminListSessionData = $request->getSession()->get($adminListName);
            if (!$query->has('page')) {
                $this->page = $adminListSessionData['page'];
            }

            if (!$query->has('orderBy')) {
                $this->orderBy = $adminListSessionData['orderBy'];
            }

            if (!$query->has('orderDirection')) {
                $this->orderDirection = $adminListSessionData['orderDirection'];
            }
        }

        // save current parameters
        $session->set(
            $adminListName,
            array(
                'page' => $this->page,
                'orderBy' => $this->orderBy,
                'orderDirection' => $this->orderDirection,
            )
        );

        $this->getFilterBuilder()->bindRequest($request);
    }
830939
public function setRequest(Request $request)
    {
        // reset the current state
        $this->reset();

        // retrieve a new session from the app
        $this->session = $this->app->make('session');

        return parent::setRequest($request);
    }
1260737
public function bind(AbstractAdmin $admin, Request $request)
    {
        if ($this->request) {
            throw new \RuntimeException('A datagrid can only be bound once to a request');
        }

        // configure our datagrid
        $resolver = new OptionsResolver();
        $this->configureOptions($resolver);
        $this->options = $resolver->resolve($admin->getDatagridOptions());

        $this->admin = $admin;
        $this->request = $request;

        // attach our fields, filters and actions
        $this->admin->buildDatagrid($this);

        $this->applyFilters();
    }
303854
public function setRequest(SimplifiedRequest $request)
    {
        if (!$this->element) {
            $this->setMatchElement($request->pathinfo);
        }

        parent::setRequest($request);
    }
248807
public function execute(Request $request = null)
    {
        $request = $request ?: $this->request;

        $this->dispatcher->dispatch($request, $this->response);

    }
201558
public function setRequest(Request $request)
    {
        $context = (new RequestContext())->fromRequest($request);

        $this->cachedRoot = null;
        $this->cachedSchema = null;
        return $this->setContext($context);
    }
808942
public function setRequest(Request $request)
    {
        $this->request = $request;

        $parsedBody = $this->request->getParsedBody();

        if (!empty($parsedBody)) {
            if (is_array($parsedBody)) {
                $this->data = array_map('trim', (array)$parsedBody);
            } else {
                $this->data = $parsedBody;
            }
        }

        return $this;
    }
1198951
public function update(Request $request)
    {
        $key = $request->get('key');
        $type = $request->get('type');

        /** @var DataType $class */
        $class = $this->{$type}();

        $class->update($request->all());

        $class->setTtl($key, $request->get('ttl'));
    }
178305
protected function doRequest($request)
    {
        if (!$this->firstRequest) {
            $this->initialize($request);
        }
        $this->firstRequest = false;

        $this->applyBindings();
        $this->applyContextualBindings();
        $this->applyInstances();
        $this->applyApplicationHandlers();

        $request = Request::createFromBase($request);
        $response = $this->kernel->handle($request);
        $this->app->make('Illuminate\Contracts\Http\Kernel')->terminate($request, $response);

        return $response;
    }