Are you concerned with the result of Doctrine's flush? If so, I'd suggest
flushing before rendering the layout by using the postDispatch hook in a
controller plugin. If you use dispatchLoopShutdown hook, the layout will
already have been rendered.
You'll need to test if the request has finished dispatching first:
class MyPlugin extends Zend_Controller_Plugin_Abstract
{
public function postDispatch(Zend_Controller_Request_Abstract $request)
{
// Return early if forward is detected
if (!$request->isDispatched()) return;
// Flush Doctrine here and update layout placeholders if necessary
}
}
--
Hector
On Fri, Apr 9, 2010 at 1:30 PM, David Mintz <[email protected]> wrote:
>
>
> On Thu, Apr 8, 2010 at 6:26 PM, jsuggs <[email protected]> wrote:
>
>>
>> I'm wanting to do some cleanup commands (ex. issue Doctrine "flush") after
>> all activity has completed (ie. no more [state] changes).
>>
>> Where is the most logical place to issue that command?
>>
>
>
> Maybe a controller plugin's dispatchLoopShutdown() hook?
>
> --
> Support real health care reform:
> http://phimg.org/
>
> --
> David Mintz
> http://davidmintz.org/
>
>
>