Set route name from request.

@param  \Illuminate\Http\Request  $request
974172
public function setRouteNameFromRequest(Request $request)
    {
        $routeName = $this->routeTranslator->getRouteNameFromPath(
            $request->getUri(), $this->getCurrentLocale()
        );

        $this->routeTranslator->setCurrentRoute($routeName);
    }
902752
public function route(Request $request)
    {
        foreach ($this->routes as $route) {
            if ($route->matches($request)) {
                return $route;
            }
        }

        return null;
    }
120633
public function setName($routeName)
    {
        $lastMethod = $this->lastRouteMethod;
        $lastIndex = count($this->routes[$lastMethod])-1;
        $indexName = $lastMethod.':'.$lastIndex;
        $this->routeNames[$indexName] = $routeName;

        $rota = $this->routes[$lastMethod][$lastIndex];
        $rota->setName($routeName);
        $this->routes[$lastMethod][$lastIndex] = $rota;

        return $this;
    }
1077465
public function setRoutename($v)
    {
        if ($v !== null) {
            $v = (string) $v;
        }

        if ($this->routename !== $v) {
            $this->routename = $v;
            $this->modifiedColumns[MxmapTableMap::COL_ROUTENAME] = true;
        }

        return $this;
    }
472435
public function getRoute(Request $request): Route
    {
        if ($this->configuration->isRestRouting()) {
            $route = RestRouter::getInstance($this->configuration, $request)->resolveRoute();

            if ($route instanceof Route) {
                return $route;
            }
        }

        $query = $request->query->get('route');
        $this->routeParams = explode('/', trim($query, '/'));

        $route = (new Route())
            ->setController($this->resolveController())
            ->setAction($this->resolveAction())
            ->setActionParams($this->resolveActionParams());

        return $route;
    }
167884
private function setRequest(Request $request = null)
    {
        $this->request = $request;
        $this->override = null;
    }
532640
public function find(Request $request)
    {
        $route = $this->getRouteFinder()->find($request, $this->getRoutes());
        $this->setCurrentRoute($route);
        return $route;
    }
983820
public function route(Request &$request)
	{
		$matcher = $this->routerContainer->getMatcher();
		$route = $matcher->match($request);
		if (!$route) {
			return false;
		}

		foreach ($route->extras as $key => $val) {
			$request = $request->withAttribute($key, $val);
		}
		foreach ($route->attributes as $key => $val) {
			$request = $request->withAttribute($key, $val);
		}
		$request = $request->withAttribute('route.name', $route->name);

		return $route->handler;
	}
65886
public function renameAction(Request $request)
    {
        $id = $request->get('id');
        $name = $request->get('name');

        $metaSetManager = $this->get('phlexible_meta_set.meta_set_manager');

        if ($metaSetManager->findOneByName($name)) {
            return new ResultResponse(false, 'Name already in use.');
        }

        $metaSet = $metaSetManager->find($id);
        $oldName = $metaSet->getName();

        $metaSet->setName($name);
        $metaSetManager->updateMetaSet($metaSet);

        return new ResultResponse(true, "Meta Set $oldName renamed to $name.");
    }
255657
private function setTrustedProxyIpAddressesToTheCallingIp(Request $request)
    {
        $request->setTrustedProxies([$request->server->get('REMOTE_ADDR')], $this->getTrustedHeaderNames());
    }
745034
private static function getCacheName(Request $request) {

        return md5((string)$request->getMethod().(string)$request->getUri());

    }
604234
public function handleHttpRequest($request)
    {
        $this->parseRequestBase($request);

        $data = $this->parseRule();
        $path = $data[0] ?? $this->routeParams->path;
        if ($path) {
            $this->parsePath($path);
        }
        if (!empty($data[1])) {
            foreach ($data[1] as $name => $value) {
                $request->get[$name] = $value;
            }
        }
    }
258241
public static function initialize($request)
    {
        Menu::setPrimaryMenuID();

        //Backend
        if (isInAdmin()) {
            $menuLinkID = (is_numeric(Input::get('menu_link_id')) ? Input::get('menu_link_id') : false);
            if($menuLinkID) {
                self::setCurrent(self::findByID($menuLinkID));
            }
        }else{ // frontend
            Post::sethomepage();

            // Set active menulinks
            self::setActiveIDs();

            // Set home page MenuLink if home page is requested
            $getCurrentPath = Request::path();
            if($getCurrentPath == '/' || $getCurrentPath == App::getLocale()) {
                self::setCurrent(Post::gethomepage());
            }else if(self::getActiveIDs()) {
                //or if any other menulink is active
                self::setCurrent(self::findByID(array_first(self::getActiveIDs())));
            }

            // Front page should not have duplicate urls
            if(Request::route('postSlug') && Request::route('postSlug') == Post::gethomepage()->slug) {
                Redirect::to('/', 301)->send();
            }
        }
    }
789377
protected function setRequestProperties(Request $request)
    {
        $this["basePath"] = $request->getBasePath();
        $this["baseUrl"] = $request->getSchemeAndHttpHost() . $this["basePath"];
    }
520995
public function setRequest(SimplifiedRequest $request)
    {
        if (!$this->key) {
            if (!empty($request->port)) {
                $key = $request->port;
            } else {
                switch ($request->scheme) {
                    case 'https':
                        $key = 443;
                        break;

                    case 'http':
                    default:
                        $key = 80;
                }
            }

            $this->setMapKey($key);
        }

        parent::setRequest($request);
    }
138766
public function setBasketTitleAction(Request $request, Basket $basket)
    {
        $basket->setName($request->get('name'));

        /** @var EntityManager $em */
        $em = $this->app['orm.em'];
        $em->persist($basket);
        $em->flush();

        return Result::create($request, ["basket" => $this->listBasket($basket)])->createResponse();
    }
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());
    }