We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab90ff1 commit 188fa85Copy full SHA for 188fa85
create_framework/routing.rst
@@ -217,6 +217,11 @@ generate absolute URLs::
217
highly optimized URL matcher class that can replace the default
218
``UrlMatcher``::
219
220
- $dumper = new Routing\Matcher\Dumper\PhpMatcherDumper($routes);
+ use Symfony\Component\Routing\Matcher\CompiledUrlMatcher;
221
+ use Symfony\Component\Routing\Matcher\Dumper\CompiledUrlMatcherDumper;
222
- echo $dumper->dump();
223
+ // $compiledRoutes is a plain PHP array that describes
224
+ // all routes using a performant data format
225
+ $compiledRoutes = (new CompiledUrlMatcherDumper($routes))->getCompiledRoutes();
226
+
227
+ $matcher = new CompiledUrlMatcher($compiledRoutes, $context);
0 commit comments