@@ -321,42 +321,42 @@ Keep the following guidelines in mind while you develop.
321321
322322#. **The order of the controller arguments does not matter **
323323
324- Symfony matches the parameter **names ** from the route to the variable
325- **names ** of the controller. The arguments of the controller could be
326- totally reordered and still work perfectly::
324+ Symfony matches the parameter **names ** from the route to the variable
325+ **names ** of the controller. The arguments of the controller could be
326+ totally reordered and still work perfectly::
327327
328- public function indexAction($lastName, $firstName)
329- {
330- // ...
331- }
328+ public function indexAction($lastName, $firstName)
329+ {
330+ // ...
331+ }
332332
333333#. **Each required controller argument must match up with a routing parameter **
334334
335- The following would throw a ``RuntimeException `` because there is no
336- ``foo `` parameter defined in the route::
335+ The following would throw a ``RuntimeException `` because there is no
336+ ``foo `` parameter defined in the route::
337337
338- public function indexAction($firstName, $lastName, $foo)
339- {
340- // ...
341- }
338+ public function indexAction($firstName, $lastName, $foo)
339+ {
340+ // ...
341+ }
342342
343- Making the argument optional, however, is perfectly ok. The following
344- example would not throw an exception::
343+ Making the argument optional, however, is perfectly ok. The following
344+ example would not throw an exception::
345345
346- public function indexAction($firstName, $lastName, $foo = 'bar')
347- {
348- // ...
349- }
346+ public function indexAction($firstName, $lastName, $foo = 'bar')
347+ {
348+ // ...
349+ }
350350
351351#. **Not all routing parameters need to be arguments on your controller **
352352
353- If, for example, the ``lastName `` weren't important for your controller,
354- you could omit it entirely::
353+ If, for example, the ``lastName `` weren't important for your controller,
354+ you could omit it entirely::
355355
356- public function indexAction($firstName)
357- {
358- // ...
359- }
356+ public function indexAction($firstName)
357+ {
358+ // ...
359+ }
360360
361361.. tip ::
362362
0 commit comments