Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e03d69f

Browse filesBrowse files
committed
Fixed a minor indentation issue
1 parent 1e1ab96 commit e03d69f
Copy full SHA for e03d69f

File tree

Expand file treeCollapse file tree

1 file changed

+25
-25
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+25
-25
lines changed

‎book/controller.rst

Copy file name to clipboardExpand all lines: book/controller.rst
+25-25Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.