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 @@ -227,16 +227,16 @@ object::
227
227
$container->setParameter('charset', 'UTF-8');
228
228
229
229
Instead of relying on the convention that the routes are defined by the
230
- ``$routes `` variables, let's use a parameter again ::
230
+ ``$routes `` variables, let's use a reference ::
231
231
232
232
// ...
233
233
$container->register('matcher', Routing\Matcher\UrlMatcher::class)
234
- ->setArguments(['% routes%' , new Reference('context')])
234
+ ->setArguments([new Reference(' routes') , new Reference('context')])
235
235
;
236
236
237
237
And the related change in the front controller::
238
238
239
- $container->setParameter ('routes', include __DIR__.'/../src/app.php' );
239
+ $container->set ('routes', $routes );
240
240
241
241
We have barely scratched the surface of what you can do with the
242
242
container: from class names as parameters, to overriding existing object
You can’t perform that action at this time.
0 commit comments