Track the current route.

@param  \Illuminate\Routing\Route  $route

@return int
10811
private function trackRoute(Route $route)
    {
        return $this->getModel()->newQuery()->firstOrCreate([
            'name'   => $this->getRouteName($route),
            'action' => $route->getActionName(),
        ])->getKey();
    }
815041
public function get($route)
    {
        $this->ensureStorage();

        if (isset($this->storage[$route]) && in_array($this->storage[$route], [self::ORIENTATION_VERTICAL, self::ORIENTATION_HORIZONTAL], true)) {
            return $this->storage[$route];
        }

        return $this->getDefaultOrientation();
    }
621386
public function processRouteFilters(Route $route)
	{
		foreach ($this->filterByRoute($route) as $filter) {

			$result = call_user_func_array($filter, func_get_args());
			
			if ($result !== null) {

				return $result;
			}
		}
	}
1328855
protected function ping($route, $data = [])
    {
        if (! config('eyewitness.api_enabled', false)) {
            return [false, 'Api Disabled'];
        }

        $data['app_token'] = config('eyewitness.app_token');
        $data['secret_key'] = config('eyewitness.secret_key');
        $data['application_environment'] = app()->environment();
        $data['eyewitness_version'] = $this->eye->version();

        $this->headers['json'] = $data;

        for ($i=0; $i<3; $i++) {
            sleep($i);
            try {
                $response = $this->client->post($this->api."/$route", $this->headers);
                $result = [$response->getStatusCode(), $response->getReasonPhrase()];
                if ($result[0] == "200") {
                    return $result;
                }
            } catch (Exception $e) {
                $result = [false, $e->getMessage()];
            }
        }

        return $result;
    }
368302
public function getDispatch($route = null)
    {
        // 没有指定调度路由则默认获取主题公共调度器
        return $route === null ? $this->getCommonDispatch() : $this->_getDispatchByRoute($route);
    }
832688
private function dispatch($request, $route)
    {
        if ($route->matched()) {
            $request = $request->withPathToMatch($route->matched(), $route->trailing());
        }
        // dispatch the route!
        return $this->dispatcher->withRoute($route)->__invoke($request);
    }
1047988
public function count()
	{
		$result = 0;

		foreach ($this->routes as $routes) {
			$result += count($routes);
		}

		return $result;
	}
1256773
public function extractRoutePath(string $route)
    {
        $url = (strpos($route, '/') === false) ? url($route) : $route;
        $this->router->handle($url);

        return $this->router->getMatchedRoute()->getPaths();
    }
106303
public function execute($route)
    {
        Logger::log('Executing the request');
        try {
            //Search action and execute
            return $this->searchAction($route);
        } catch (AccessDeniedException $e) {
            Logger::log(t('Solicitamos credenciales de acceso a zona restringida'), LOG_WARNING, ['file' => $e->getFile() . '[' . $e->getLine() . ']']);
            return Admin::staticAdminLogon($route);
        } catch (RouterException $r) {
            Logger::log($r->getMessage(), LOG_WARNING);
        } catch (\Exception $e) {
            Logger::log($e->getMessage(), LOG_ERR);
            throw $e;
        }

        throw new RouterException(t('Página no encontrada'), 404);
    }
36374
public function runController($route)
    {
        if (null !== ($ca = $this->createController($route, $this))) {
            list($controller, $actionID) = $ca;
            /* @var BaseController $controller */
            $oldController = $this->_controller;
            $this->_controller = $controller;
            $controller->init();
            if (null === $actionID) {
                $controller->run();
            } else {
                $controller->runActionId($actionID);
            }
            $this->_controller = $oldController;
        } else {
            $this->missingController($route);
        }
    }
460049
protected function dispatchRoute(\Parable\Routing\Route $route)
    {
        $this->response->setHttpCode(200);
        $this->hook->trigger(self::HOOK_HTTP_200, $route);

        $dispatcher = \Parable\DI\Container::get(\Parable\Framework\Dispatcher::class);
        $dispatcher->dispatch($route);

        return $this;
    }
1050404
public static function delete(Route $route)
    {
        $routeWithoutSlash = $route;
        $routeWithSlash = $route->getWithSlash();

        // exception_if(! check(self::$register[$routeWithoutSlash->getName()]), RouteNotFoundInRoutesRegisterException::class , $routeWithoutSlash);
        // exception_if(! check(self::$register[$routeWithSlash->getName()]), RouteNotFoundInRoutesRegisterException::class , $routeWithSlash);

        if (check(self::$register[$routeWithoutSlash->getName()])) {
            unset(self::$register[$routeWithoutSlash->getName()]);
        }

        if (check(self::$register[$routeWithSlash->getName()])) {
            unset(self::$register[$routeWithSlash->getName()]);
        }
    }
226424
private function checkForMetaRoute($route)
    {
        $this->baseRoute = $route;
        $this->metaRoute = null;

        // If route exits in index, use it
        if ($this->mapRoute2IndexKey($route)) {
            return $route;
        }

        // Check for pagination
        $pagination = $this->config["pagination"];
        $matches = [];
        $pattern = "/(.*?)\/($pagination)\/(\d+)$/";
        if (preg_match($pattern, $route, $matches)) {
            $this->baseRoute = $matches[1];
            $this->metaRoute = $route;
            $this->currentPage = $matches[3];
        }

        return $this->baseRoute;
    }
213165
public function inflect(Route $route)
    {
        $arguments = $this->extractAttributes($route);
        return $this->createDispatch($arguments);
    }
6115
public function trackMatchedRoute(Route $route, Request $request)
    {
        if ( ! $this->isEnabled()) return;

        $tracker = $this->getRouteTracker();

        if ($tracker->isTrackable($route)) {
            $this->mergeVisitorActivityData([
                'route_path_id' => $tracker->track($route, $request),
            ]);
        }
        else
            $this->disable();
    }
574043
protected function routeCanBeShown($route): bool
    {
        return ($route->canBeShown() && $route->getRoutable()->canBeShown() || $this->gate->allows('viewInactive', $route));
    }
499720
private function trackRoutePathParameters(Route $route, Models\RoutePath $routePath)
    {
        $parameters = [];

        if ($route->hasParameters()) {
            foreach ($route->parameters() as $parameter => $value) {
                $parameters[] = $this->makeModel(BindingManager::MODEL_ROUTE_PATH_PARAMETER)->fill([
                    'parameter' => $parameter,
                    'value'     => $this->checkIfValueIsEloquentModel($value),
                ]);
            }
        }

        if (count($parameters) > 0)
            $routePath->parameters()->saveMany($parameters);
    }