Zend\MVC - The MvcEvent
14 important questions on Zend\MVC - The MvcEvent
What interface must be implemented to auto inject the
MvcEvent?
Which 7 objects are hold by a MvcEvent?
2. Request
3. Response
4. Router
5. RouteMatch
6. Result
7. ViewModel
What 7 MvcEvent's are triggered (in precise order)?
2. MvcEvent::EVENT_ROUTE
3. MvcEvent::EVENT_DISPATCH
4. MvcEvent::EVENT_DISPATCH_ERROR
5. MvcEvent::EVENT_RENDER
6. MvcEvent::EVENT_RENDER_ERROR
7. MvcEvent::EVENT_FINISH
- Higher grades + faster learning
- Never study anything twice
- 100% sure, 100% understanding
What are the 2 default listeners for MvcEvent::EVENT_ROUTE?
1. ModuleRouteListener
2. RouteListener
What class triggers the MvcEvent::EVENT_ROUTE?
What are the 2 listeners for the MvcEvent::EVENT_DISPATCH (both http and console based)?
1. DispatchListener::onDispatch()
2. AbstractController::onDispatch()
Which two classes trigger the MvcEvent::EVENT_BOOTSTRAP?
2. Zend\Mvc\Controller\AbstractController::dispatch()
What is the listener for the MvcEvent::EVENT_DISPATCH_ERROR (both contexts)?
What are the 2 listeners for the MvcEvent::EVENT_RENDER?
2. Zend\Mvc\View\Http\DefaultRenderingStrategy::render() (http)
What is the trigger for the MvcEvent::EVENT_RENDER?
What are the 2 listeners for the MvcEvent::EVENT_RENDER_ERROR? (console based)?
1. ExceptionStrategy::prepareExceptionViewModel()
2. InjectViewModelListener::injectViewModel()
What is the trigger for the MvcEvent::EVENT_RENDER_ERROR?
1. DefaultRenderingStrategy::render()
What is the listener for the MvcEvent::EVENT_FINISH?
What are the 3 triggers for the MvcEvent::EVENT_FINISH?
1. run() (after EVENT_ROUTE)
2. run() (after EVENT_DISPATCH)
3. completeRequest() (after EVENT_RENDER)
The question on the page originate from the summary of the following study material:
- A unique study and practice tool
- Never study anything twice again
- Get the grades you hope for
- 100% sure, 100% understanding
![Trustpilot Logo](/images/design_2020/lp/clp-trustpilot-en.png)