The free concept of strategy in Zend Framework 2 is the behavior that an application must observe when events are fired during the MVC application cycle, which is actually event driven.
More generally, a strategy is basically an event listener, usually a specific instance of \Zend\EventManager\AbstractListenerAggregate and usually listens to \Zend\Mvc\MvcEvent various events, such as EVENT_RENDER and EVENT_RENDER_ERROR .
The listener is connected to \Zend\EventManager\EventManager , and then using the \Zend\Mvc\MvcEvent to access all the main resources of the MVC cycle (router, request, response, application itself, etc.), the listener can check application status and change its flow.
In the example provided by the official ZF2 docs, the listener checks the headers for accepting the request, selects the visualization tool, and modifies the response accordingly.
This is a bit outdated, so I would suggest looking at some of the best examples reading the code for the stitching strategies provided by the framework, i.e. \Zend\Mvc\View\Http\RouteNotFoundStrategy , which listens to EVENT_DISPATCH and EVENT_DISPATCH_ERROR to handle rendering of 404 error pages.
It is also important that you understand how the entire EventManager . The white papers for this are pretty good, plus there are a lot of things about it if you advertise on Google.
source share