Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

[Routing] Add a note for invokable controllers#6951

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
xabbuh merged 1 commit intosymfony:2.7fromchalasr:invokable_controllers
May 17, 2017

Conversation

chalasr
Copy link
Member

Since this feature can help to avoid defining controllers as services or writingController::__invoke when it's not needed, I think we should document it.

@chalasrchalasr changed the title[Routing] Add a note for refering invokable controllers[Routing] Add a note for invokable controllersSep 16, 2016
.. tip::

For referring to the ``__invoke`` method of a controller, no need for
passing the method name, just use its fully-qualified namespace.
Copy link
Member

Choose a reason for hiding this comment

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

I think we should reword this a bit:

To refer to an action that is implemented as the__invoke() method of a controller class, you do not have to pass the method name, but can just use the fully qualified class name.

And we should then add an example for it imo.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe also move it to its own headline?

Copy link
MemberAuthor

@chalasrchalasrSep 22, 2016
edited
Loading

Choose a reason for hiding this comment

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

👍 For reword and the example, I made the changes.
About the visibility, IMHO we should stay consistent with thecontrollers as a servicenote above, don't you think it's enough as is?

xabbuh and HeahDude reacted with thumbs up emoji
@linaori
Copy link
Contributor

In the note below it's referencing to Controller as a Service. When using Controller as a Service, you simply refer to the service id:app.controller.foo:__invoke would beapp.controller.foo.

@chalasr
Copy link
MemberAuthor

@iltar The note redirects to a dedicated section which already document thathttps://github.com/symfony/symfony-docs/blob/master/controller/service.rst#referring-to-the-service

Copy link
Contributor

@HeahDudeHeahDude left a comment

Choose a reason for hiding this comment

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

👍

@xabbuh
Copy link
Member

Thank you@chalasr.

@xabbuhxabbuh merged commit0b046b3 intosymfony:2.7May 17, 2017
xabbuh added a commit that referenced this pull requestMay 17, 2017
This PR was merged into the 2.7 branch.Discussion----------[Routing] Add a note for invokable controllersSince this feature can help to avoid defining controllers as services or writing `Controller::__invoke` when it's not needed, I think we should document it.Commits-------0b046b3 [Routing] Add a note for refering invokable controllers
@chalasrchalasr deleted the invokable_controllers branchMay 17, 2017 07:41
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@xabbuhxabbuhxabbuh left review comments

@HeahDudeHeahDudeHeahDude approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

5 participants
@chalasr@linaori@xabbuh@HeahDude@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp