/** * Add the given route to the arrays of routes. * * @param \Routing\Route $route * @return void */ protected function addToCollections($route) { $domainAndUri = $route->domain() . $route->getUri(); foreach ($route->methods() as $method) { $this->routes[$method][$domainAndUri] = $route; } $this->allRoutes[$method . $domainAndUri] = $route; }
/** * Get the formatted domain for a given route. * * @param \Routing\Route $route * @param array $parameters * @return string */ protected function getRouteDomain($route, &$parameters) { return $route->domain() ? $this->formatDomain($route, $parameters) : null; }