Simulate Zend Framework preDispatch and postDispatch in a Zend Framework 2 application