Does the ZF2 forward()
controller plugin fire off a new request cycle? Or part thereof?
I am writing a ZF2 MVC application with widgetized content. The widgetized content is exposed via its own controller action because sometimes I need to hit it with ajax.
When I need to incorporate the widgetized content as a sub-view of another action (i.e. on a full page load), that action is using the forward()
plugin to get the widgetized content. If it's going to introduce a significant overhead though I will go straight to the service layer instead (even though that approach is less DRY).
I realise that a performance test will answer this question for me, but I'm a few weeks away from being able to run such a test.
EDIT: when I say 'new request cycle', I mean the ZF2 MVC request cycle, i.e. route, dispatch, etc. Intuitively I would doubt it fires route a second time, but it could start the cycle from dispatch. I'm asking the question because I know that in ZF1 it triggered a who second cycle, which was a real performance drain.