File tree 1 file changed +3
-3
lines changed
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::
39
39
$routes = new RouteCollection();
40
40
$routes->add('route_name', $route);
41
41
42
- $context = new RequestContext($_SERVER['REQUEST_URI'] );
42
+ $context = new RequestContext('/' );
43
43
44
44
$matcher = new UrlMatcher($routes, $context);
45
45
@@ -207,7 +207,7 @@ a certain route::
207
207
$routes = new RouteCollection();
208
208
$routes->add('show_post', new Route('/show/{slug}'));
209
209
210
- $context = new RequestContext($_SERVER['REQUEST_URI'] );
210
+ $context = new RequestContext('/' );
211
211
212
212
$generator = new UrlGenerator($routes, $context);
213
213
@@ -327,7 +327,7 @@ automatically in the background if you want to use it. A basic example of the
327
327
:class: `Symfony\\ Component\\ Routing\\ Router ` class would look like::
328
328
329
329
$locator = new FileLocator(array(__DIR__));
330
- $requestContext = new RequestContext($_SERVER['REQUEST_URI'] );
330
+ $requestContext = new RequestContext('/' );
331
331
332
332
$router = new Router(
333
333
new YamlFileLoader($locator),
You can’t perform that action at this time.
0 commit comments