File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ your autoloader to load the Routing component::
3939 $routes = new RouteCollection();
4040 $routes->add('route_name', $route);
4141
42- $context = new RequestContext($_SERVER['REQUEST_URI'] );
42+ $context = new RequestContext('/' );
4343
4444 $matcher = new UrlMatcher($routes, $context);
4545
@@ -207,7 +207,7 @@ a certain route::
207207 $routes = new RouteCollection();
208208 $routes->add('show_post', new Route('/show/{slug}'));
209209
210- $context = new RequestContext($_SERVER['REQUEST_URI'] );
210+ $context = new RequestContext('/' );
211211
212212 $generator = new UrlGenerator($routes, $context);
213213
@@ -327,7 +327,7 @@ automatically in the background if you want to use it. A basic example of the
327327:class: `Symfony\\ Component\\ Routing\\ Router ` class would look like::
328328
329329 $locator = new FileLocator(array(__DIR__));
330- $requestContext = new RequestContext($_SERVER['REQUEST_URI'] );
330+ $requestContext = new RequestContext('/' );
331331
332332 $router = new Router(
333333 new YamlFileLoader($locator),
You can’t perform that action at this time.
0 commit comments