-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Add a section on front controllers and the AppKernel #2465
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
Conversation
Could you please add the pull request format to your PR message? And I think this issue is related: #997 |
@@ -0,0 +1,99 @@ | |||
Understanding how Front Controller, Kernel and Environments work together |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are missing an .. index::
block at the first line of your page
Kernel and implement these methods. The resulting class is | ||
conventionally called the ``AppKernel``. | ||
|
||
Again, the Symfony2 Standard Edition provides an ```AppKernel```_ in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wouterj Is that correct with a triple ` plus the underscore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mpdude no, you can't mix inline formats in Sphinx. So you just need to use 1 backtick to create a link.
@wouterj Thanks for the quick feedback and sorry for getting so many basics wrong. I hope I did not forget one of your comments. |
processed. | ||
|
||
The main purpose of the front controller is to create an instance of the | ||
``AppKernel`` (more on that in a second), make it handle the reques and |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo reques
missing a t
there are several places that talk about Apache rewrite rules, i think it should be stated somewhere that equivalent behavior can be achieved with pretty much every other web server. |
All feedback picked up - thanks! |
|
||
The `front controller`_ is a well-known design pattern; it is a | ||
section of | ||
code that *all* requests served by an application run through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way it is wrapped is weird here
:method:`constructor<Symfony\\Component\\HttpKernel\\Kernel::__construct>` | ||
and is available via | ||
:method:`getEnvironment()<Symfony\\Component\\HttpKernel\\Kernel::getEnvironment>`, | ||
to decide which bundles to create in ``registerBundles()``. This method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this method
refer to getEnvironment
or registerbundles
here ?
@wouterj thanks for keeping an eye on it. I removed the reference to the Debug Component. |
symfony/symfony#7441 has been merged. |
Hi Matthias! Very nice work! I've patched this into the 2.0 branch so that all branches can enjoy it, and removed the Debug reference (but re-added it to the master branch only). Thanks! |
@weaverryan just saw that the 'decorate' link in the Front Controller paragraph is broken. Could you please fix that? Thanks! |
The link to the RewriteRule is broken as well :-( |
Here are some additions on how front controllers and custom AppKernels can be used to further tweak the runtime environment.
This is my first piece of .rst, so probably a lot of things and markup needs to be fixed. Additionally, we should discuss which is the best place for this document.