@@ -120,7 +120,7 @@ Thanks to these two routes:
120120
121121* If the user goes to ``/blog/* ``, the second route is matched and ``showAction() ``
122122 is executed. Because the route path is ``/blog/{slug} ``, a ``$slug `` variable is
123- passed to ``showAction `` matching that value. For example, if the user goes to
123+ passed to ``showAction() `` matching that value. For example, if the user goes to
124124 ``/blog/yay-routing ``, then ``$slug `` will equal ``yay-routing ``.
125125
126126Whenever you have a ``{placeholder} `` in your route path, that portion becomes a
@@ -363,7 +363,7 @@ With all of this in mind, check out this advanced example:
363363 {
364364 /**
365365 * @Route(
366- * "/articles/{_locale}/{year}/{title }.{_format}",
366+ * "/articles/{_locale}/{year}/{slug }.{_format}",
367367 * defaults={"_format": "html"},
368368 * requirements={
369369 * "_locale": "en|fr",
@@ -372,7 +372,7 @@ With all of this in mind, check out this advanced example:
372372 * }
373373 * )
374374 */
375- public function showAction($_locale, $year, $title )
375+ public function showAction($_locale, $year, $slug )
376376 {
377377 }
378378 }
@@ -381,7 +381,7 @@ With all of this in mind, check out this advanced example:
381381
382382 # app/config/routing.yml
383383 article_show :
384- path : /articles/{_locale}/{year}/{title }.{_format}
384+ path : /articles/{_locale}/{year}/{slug }.{_format}
385385 defaults : { _controller: AppBundle:Article:show, _format: html }
386386 requirements :
387387 _locale : en|fr
@@ -398,7 +398,7 @@ With all of this in mind, check out this advanced example:
398398 http://symfony.com/schema/routing/routing-1.0.xsd" >
399399
400400 <route id =" article_show"
401- path =" /articles/{_locale}/{year}/{title }.{_format}" >
401+ path =" /articles/{_locale}/{year}/{slug }.{_format}" >
402402
403403 <default key =" _controller" >AppBundle:Article:show</default >
404404 <default key =" _format" >html</default >
@@ -418,7 +418,7 @@ With all of this in mind, check out this advanced example:
418418 $collection = new RouteCollection();
419419 $collection->add(
420420 'article_show',
421- new Route('/articles/{_locale}/{year}/{title }.{_format}', array(
421+ new Route('/articles/{_locale}/{year}/{slug }.{_format}', array(
422422 '_controller' => 'AppBundle:Article:show',
423423 '_format' => 'html',
424424 ), array(
@@ -502,11 +502,11 @@ The pattern has three parts, each separated by a colon:
502502
503503For example, a ``_controller `` value of ``AppBundle:Blog:show `` means:
504504
505- ============= ================== ==============
505+ ============= ================== ================
506506Bundle Controller Class Method Name
507- ============= ================== ==============
508- ``AppBundle `` ``BlogController `` ``showAction ``
509- ============= ================== ==============
507+ ============= ================== ================
508+ ``AppBundle `` ``BlogController `` ``showAction() ``
509+ ============= ================== ================
510510
511511The controller might look like this::
512512
@@ -524,7 +524,7 @@ The controller might look like this::
524524 }
525525
526526Notice that Symfony adds the string ``Controller `` to the class name (``Blog ``
527- => ``BlogController ``) and ``Action `` to the method name (``show `` => ``showAction ``).
527+ => ``BlogController ``) and ``Action `` to the method name (``show `` => ``showAction() ``).
528528
529529You could also refer to this controller using its fully-qualified class name
530530and method: ``AppBundle\Controller\BlogController::showAction ``. But if you
0 commit comments