Reputation: 48
Can someone explain me basic bootstrap process of symfony 2 application. From entry point, to specific action in controller, and rendering view using twig template system.
Upvotes: 1
Views: 1168
Reputation: 1922
There is a chapter in the symfony book about this: http://symfony.com/doc/current/book/internals.html
Reading the whole chapter will give you a pretty good understanding of how things work under the hood.
I will cite the important part here for the sake of completeness:
Handling Requests
The handle() method takes a Request and always returns a Response. To convert the Request, handle() relies on the Resolver and an ordered chain of Event notifications (see the next section for more information about each Event):
If an Exception is thrown during processing, the kernel.exception is notified and listeners are given a chance to convert the Exception to a Response. If that works, the kernel.response event is notified; if not, the Exception is re-thrown.
If you don't want Exceptions to be caught (for embedded requests for instance), disable the kernel.exception event by passing false as the third argument to the handle() method.
Upvotes: 4