I've tried to use Zend Events to catch the final response before it is passed to output. But I always only got the event fired before rendering and with empty response.
I tried like this:
`
$eventManager->attach(ViewEvent::EVENT_RESPONSE, function($event) { ... })
$sharedEvents->attach('Zend\View\View', ViewEvent::EVENT_RESPONSE, function($event) { ... })
$eventManager->attach(MvcEvent::EVENT_FINISH, function($event) { ... })
`
Always only firing before and not after the final rendering.
I've tried to use Zend Events to catch the final response before it is passed to output. But I always only got the event fired before rendering and with empty response.
I tried like this:
`
$eventManager->attach(ViewEvent::EVENT_RESPONSE, function($event) { ... })
$sharedEvents->attach('Zend\View\View', ViewEvent::EVENT_RESPONSE, function($event) { ... })
$eventManager->attach(MvcEvent::EVENT_FINISH, function($event) { ... })
`
Always only firing before and not after the final rendering.