Capture output of another action within current action?
Posted
by wizzard
on Stack Overflow
See other posts from Stack Overflow
or by wizzard
Published on 2010-06-01T22:12:51Z
Indexed on
2010/06/02
11:53 UTC
Read the original article
Hit count: 265
zend-framework
I have been trying to find a way to capture the output (rendered view) of another action within the current action... something akin to output buffering.
The scenario is that I need to save a "snapshot" of a report. The data used in the report is ever-changing, and for whatever reason I need to actually save the view HTML rather than just a data array. I have created a snapshotAction(), and I want to somehow capture the output of the separate reportAction() within it. I don't want to render the reportAction() to the screen, I want it to render within my current action, before the action completes.
Is there any way to do this in ZF?
© Stack Overflow or respective owner