so im reading the internals documentation for symfony2 http://symfony.com/doc/current/book/internals.html and i dont understand this section http://symfony.com/doc/current/book/internals.html#events.
so, i want to know the difference between MASTER / SUB REQUEST ?
The master request is the one that comes from the original user; the subrequest is the one that you do internally — either with the forward()
method of HttpKernel
— or by the forward()
helper of the framework's Controller
class — or {% render ... %}
in Twig.
The master request is the one, that is triggered by the browser and the sub requests are requests from within the application. For example a template can render another action
<div id="sidebar">
{% render "AcmeArticleBundle:Article:recentArticles" with {'max': 3} %}
</div>
(Example taken from the manual)
This will lead to a sub request.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With