getRouteByName() while catching and ignoring eventual exceptions. * * If $names is null, this method SHOULD return a collection of all routes * known to this provider. If there are many routes to be expected, usage of * a lazy loading collection is recommended. A provider MAY only return a * subset of routes to e.g. support paging or other concepts. * * @param array|null $names * The list of names to retrieve, In case of null, the provider will * determine what routes to return. * * @return \Symfony\Component\Routing\Route|\Symfony\Component\Routing\Alias[] * Iterable list with the keys being the names from the $names array */ public function getRoutesByNames($names); /** * Get all routes which match a certain pattern. * * @param string $pattern * The route pattern to search for (contains {} as placeholders). * * @return \Symfony\Component\Routing\RouteCollection * Returns a route collection of matching routes. The collection may be * empty and will be sorted from highest to lowest fit (match of path parts) * and then in ascending order by route name for routes with the same fit. */ public function getRoutesByPattern($pattern); /** * Returns all the routes on the system. * * Usage of this method is discouraged for performance reasons. If possible, * use RouteProviderInterface::getRoutesByNames() or * RouteProviderInterface::getRoutesByPattern() instead. * * @return \Symfony\Component\Routing\Route[] * An iterator of routes keyed by route name. */ public function getAllRoutes(); /** * Resets the route provider object. */ public function reset(); /** * Gets aliases for a route name. * * The aliases can be found using the ::getAliases() method of the returned * route collection. * * @param string $route_name * The route name. * * @return iterable<\Symfony\Component\Routing\Alias> * Iterable list of aliases for the given route name. */ public function getRouteAliases(string $route_name): iterable; }