private findRouteByPath ( string $path, string $locale ) : Sulu\Bundle\RouteBundle\Entity\Route | ||
$path | string | |
$locale | string | |
Результат | Sulu\Bundle\RouteBundle\Entity\Route |
private function findRouteByPath($path, $locale)
{
$path = '/' . ltrim($path, '/');
if (!array_key_exists($path, $this->routeCache)) {
$this->routeCache[$path] = $this->routeRepository->findByPath($path, $locale);
}
return $this->routeCache[$path];
}