function Router::getCompiledRoutes
2 calls to Router::getCompiledRoutes()
- Router::getGenerator in vendor/
symfony/ routing/ Router.php - Gets the UrlGenerator instance associated with this Router.
- Router::getMatcher in vendor/
symfony/ routing/ Router.php - Gets the UrlMatcher or RequestMatcher instance associated with this Router.
File
-
vendor/
symfony/ routing/ Router.php, line 294
Class
- Router
- The Router class is an example of the integration of all pieces of the routing system for easier use.
Namespace
Symfony\Component\RoutingCode
private static function getCompiledRoutes(string $path) : array {
if ([] === self::$cache && \function_exists('opcache_invalidate') && filter_var(\ini_get('opcache.enable'), \FILTER_VALIDATE_BOOL) && (!\in_array(\PHP_SAPI, [
'cli',
'phpdbg',
'embed',
], true) || filter_var(\ini_get('opcache.enable_cli'), \FILTER_VALIDATE_BOOL))) {
self::$cache = null;
}
if (null === self::$cache) {
return require $path;
}
return self::$cache[$path] ??= (require $path);
}