Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add empty parentheses to method names #7016

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions routing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ Thanks to these two routes:

* If the user goes to ``/blog/*``, the second route is matched and ``showAction()``
is executed. Because the route path is ``/blog/{slug}``, a ``$slug`` variable is
passed to ``showAction`` matching that value. For example, if the user goes to
passed to ``showAction()`` matching that value. For example, if the user goes to
``/blog/yay-routing``, then ``$slug`` will equal ``yay-routing``.

Whenever you have a ``{placeholder}`` in your route path, that portion becomes a
Expand Down Expand Up @@ -502,11 +502,11 @@ The pattern has three parts, each separated by a colon:

For example, a ``_controller`` value of ``AppBundle:Blog:show`` means:

============= ================== ==============
============= ================== ================
Bundle Controller Class Method Name
============= ================== ==============
``AppBundle`` ``BlogController`` ``showAction``
============= ================== ==============
============= ================== ================
``AppBundle`` ``BlogController`` ``showAction()``
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You now have to expand the table = lines.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, sorry, missed it. Expanded

============= ================== ================

The controller might look like this::

Expand All @@ -524,7 +524,7 @@ The controller might look like this::
}

Notice that Symfony adds the string ``Controller`` to the class name (``Blog``
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction``).
=> ``BlogController``) and ``Action`` to the method name (``show`` => ``showAction()``).

You could also refer to this controller using its fully-qualified class name
and method: ``AppBundle\Controller\BlogController::showAction``. But if you
Expand Down