Описание тега zend-view
NoneProvides the “View” layer of Zend Framework 2’s MVC system. It is a multi-tiered system allowing a variety of mechanisms for extension, substitution, and more.
The components of the view layer are as follows:
- Variables Containers hold variables and callbacks that you wish to represent in the view. Often-times, a Variables Container will also provide mechanisms for context-specific escaping of variables and more.
- View Models hold Variables Containers, specify the template to use (if any), and optionally provide rendering options (more on that below). View Models may be nested in order to represent complex structures.
- Renderers take View Models and provide a representation of them to return. Zend Framework 2 ships with three renderers by default: a PhpRenderer which utilizes PHP templates in order to generate markup, a JsonRenderer, and a FeedRenderer for generating RSS and Atom feeds.
- Resolvers utilizes Resolver Strategies to resolve a template name to a resource a Renderer may consume. As an example, a Resolver may take the name “blog/entry” and resolve it to a PHP view script.
- The View consists of strategies that map the current Request to a Renderer, and strategies for injecting the result of rendering to the Response.
- Rendering Strategies listen to the “renderer” event of the View and decide which Renderer should be selected based on the Request or other criteria.
- Response Strategies are used to inject the Response object with the results of rendering. That may also include taking actions such as setting Content-Type headers.