else { throw new \
LogicException(sprintf('You should either pass a "%s" instance or provide the $parameters argument of the "%s" method.', SymfonyContainerInterface::
class, __METHOD__
));
} $this->defaultLocale =
$defaultLocale;
} public function getRouteCollection(): RouteCollection
{ if (!
isset($this->collection
)) { $this->collection =
$this->container->
get('routing.loader'
)->
load($this->resource,
$this->options
['resource_type'
]);
$this->
resolveParameters($this->collection
);
$this->collection->
addResource(new ContainerParametersResource($this->collectedParameters
));
try { $containerFile =
($this->paramFetcher
)('kernel.cache_dir'
).'/'.
($this->paramFetcher
)('kernel.container_class'
).'.php';
if (file_exists($containerFile)) { $this->collection->
addResource(new FileResource($containerFile));
} else { $this->collection->
addResource(new FileExistenceResource($containerFile));
} } catch (ParameterNotFoundException
) { } }