Skip to content

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

Closed
wants to merge 7 commits into from
Closed

Add a section on front controllers and the AppKernel #2465

wants to merge 7 commits into from

Conversation

mpdude
Copy link
Contributor

@mpdude mpdude commented Apr 4, 2013

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets n/a

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.

@wouterj
Copy link
Member

wouterj commented Apr 4, 2013

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
Copy link
Member

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
Copy link
Contributor Author

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?

Copy link
Member

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.

@mpdude
Copy link
Contributor Author

mpdude commented Apr 4, 2013

@wouterj Thanks for the quick feedback and sorry for getting so many basics wrong.

I hope I did not forget one of your comments.

@mpdude
Copy link
Contributor Author

mpdude commented Apr 5, 2013

@lsmith77 as you opened #997 it would be nice to get your feedback as well

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
Copy link
Contributor

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

@lsmith77
Copy link
Contributor

lsmith77 commented Apr 5, 2013

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.

@mpdude
Copy link
Contributor Author

mpdude commented Apr 5, 2013

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.
Copy link
Member

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
Copy link
Member

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 ?

@mpdude
Copy link
Contributor Author

mpdude commented Apr 6, 2013

@wouterj thanks for keeping an eye on it. I removed the reference to the Debug Component.

@mpdude
Copy link
Contributor Author

mpdude commented Apr 7, 2013

symfony/symfony#7441 has been merged.

@wouterj
Copy link
Member

wouterj commented Apr 7, 2013

@mpdude yes, I saw it. You can add that component in the list now. When #2479 is merged into the docs, you can add a link to that documentation as well.

@mpdude
Copy link
Contributor Author

mpdude commented Apr 8, 2013

@wouterj I think I am done with it for the moment, feel free to merge it at any time.

If you do so before #2479, I'll ask over there to update the link to it on this page.

@weaverryan
Copy link
Member

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 weaverryan closed this Apr 15, 2013
@mpdude mpdude deleted the front-controllers-and-kernel branch April 16, 2013 00:12
@mpdude
Copy link
Contributor Author

mpdude commented Apr 16, 2013

@weaverryan just saw that the 'decorate' link in the Front Controller paragraph is broken. Could you please fix that?

Thanks!

@mpdude
Copy link
Contributor Author

mpdude commented Apr 16, 2013

The link to the RewriteRule is broken as well :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants