From 6072d0771d1d20fd3d448b5702cabe655b36fe47 Mon Sep 17 00:00:00 2001 From: Wouter J Date: Mon, 14 Apr 2014 16:03:43 +0200 Subject: [PATCH] Fixed wrong blockquote rendering --- book/controller.rst | 56 ++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/book/controller.rst b/book/controller.rst index 9ef18da08d3..a351e3947d8 100644 --- a/book/controller.rst +++ b/book/controller.rst @@ -279,44 +279,44 @@ the following guidelines in mind while you develop. * **The order of the controller arguments does not matter** - Symfony is able to match the parameter names from the route to the variable - names in the controller method's signature. In other words, it realizes that - the ``{lastName}`` parameter matches up with the ``$lastName`` argument. - The arguments of the controller could be totally reordered and still work - perfectly:: - - public function indexAction($lastName, $color, $firstName) - { - // ... - } + Symfony is able to match the parameter names from the route to the variable + names in the controller method's signature. In other words, it realizes that + the ``{lastName}`` parameter matches up with the ``$lastName`` argument. + The arguments of the controller could be totally reordered and still work + perfectly:: + + public function indexAction($lastName, $color, $firstName) + { + // ... + } * **Each required controller argument must match up with a routing parameter** - The following would throw a ``RuntimeException`` because there is no ``foo`` - parameter defined in the route:: + The following would throw a ``RuntimeException`` because there is no ``foo`` + parameter defined in the route:: - public function indexAction($firstName, $lastName, $color, $foo) - { - // ... - } + public function indexAction($firstName, $lastName, $color, $foo) + { + // ... + } - Making the argument optional, however, is perfectly ok. The following - example would not throw an exception:: + Making the argument optional, however, is perfectly ok. The following + example would not throw an exception:: - public function indexAction($firstName, $lastName, $color, $foo = 'bar') - { - // ... - } + public function indexAction($firstName, $lastName, $color, $foo = 'bar') + { + // ... + } * **Not all routing parameters need to be arguments on your controller** - If, for example, the ``lastName`` weren't important for your controller, - you could omit it entirely:: + If, for example, the ``lastName`` weren't important for your controller, + you could omit it entirely:: - public function indexAction($firstName, $color) - { - // ... - } + public function indexAction($firstName, $color) + { + // ... + } .. tip::