Instantiates and configures all classes related to the view layer, including
the renderer (and its associated resolver(s) and helper manager), the view
object (and its associated rendering strategies), and the various MVC
strategies and listeners.
Defines and manages the following services:
- ViewHelperManager (also aliased to Zend\View\HelperPluginManager)
- ViewTemplateMapResolver (also aliased to Zend\View\Resolver\TemplateMapResolver)
- ViewTemplatePathStack (also aliased to Zend\View\Resolver\TemplatePathStack)
- ViewResolver (also aliased to Zend\View\Resolver\AggregateResolver and ResolverInterface)
- ViewRenderer (also aliased to Zend\View\Renderer\PhpRenderer and RendererInterface)
- ViewPhpRendererStrategy (also aliased to Zend\View\Strategy\PhpRendererStrategy)
- View (also aliased to Zend\View\View)
- DefaultRenderingStrategy (also aliased to Zend\Mvc\View\Http\DefaultRenderingStrategy)
- ExceptionStrategy (also aliased to Zend\Mvc\View\Http\ExceptionStrategy)
- RouteNotFoundStrategy (also aliased to Zend\Mvc\View\Http\RouteNotFoundStrategy and 404Strategy)
- ViewModel
Methods
Attach one or more listeners
attach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited
Implementors may add an optional $priority argument; the EventManager
implementation will pass this to the aggregate.
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::attach() |
Parameters
Detach all previously attached listeners
detach(\Zend\EventManager\EventManagerInterface $events) : void
Inherited
| inherited_from |
\Zend\EventManager\AbstractListenerAggregate::detach() |
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::detach() |
Parameters
Instantiates and configures the exception strategy
getExceptionStrategy() : \Zend\Mvc\View\Console\ExceptionStrategy
Overriding to ensure we pick up the exception strategy for console, as
well as to ensure that the appropriate aliases are set.
Returns
Instantiates and configures the renderer's helper manager
getHelperManager() : \Zend\View\HelperPluginManager
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getHelperManager() |
Returns
getInjectTemplateListener()
getInjectTemplateListener()
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getInjectTemplateListener() |
Retrieves the layout template name from the configuration
getLayoutTemplate() : string
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getLayoutTemplate() |
Returns
string
Instantiates and configures the default MVC rendering strategy
getMvcRenderingStrategy() : \Zend\Mvc\View\Console\DefaultRenderingStrategy
Overriding to ensure we pick up the MVC rendering strategy for console,
as well as to ensure that the appropriate aliases are set.
Returns
Instantiates and configures the renderer
getRenderer() : \Zend\View\Renderer\PhpRenderer
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getRenderer() |
Returns
Instantiates and configures the renderer strategy for the view
getRendererStrategy() : \Zend\View\Strategy\PhpRendererStrategy
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getRendererStrategy() |
Returns
Instantiates and configures the renderer's resolver
getResolver() : \Zend\View\Resolver\ResolverInterface
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getResolver() |
Returns
Instantiates and configures the "route not found", or 404, strategy
getRouteNotFoundStrategy() : \Zend\Mvc\View\Console\RouteNotFoundStrategy
Overriding to ensure we pick up the route not found strategy for console,
as well as to ensure that the appropriate aliases are set.
Returns
Instantiates and configures the view
getView() : \Zend\View\View
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getView() |
Returns
Configures the MvcEvent view model to ensure it has the template injected
getViewModel() : \Zend\View\Model\ModelInterface
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::getViewModel() |
Returns
Prepares the view layer
onBootstrap(\Zend\Mvc\MvcEvent $event) : void
Overriding, as several operations are omitted in the console view
algorithms, as well as to ensure we pick up the Console variants
of several listeners and strategies.
Parameters
Register additional mvc rendering strategies
registerMvcRenderingStrategies(\Zend\EventManager\EventManagerInterface $events) : void
Inherited
If there is a "mvc_strategies" key of the view manager configuration, loop
through it. Pull each as a service from the service manager, and, if it
is a ListenerAggregate, attach it to the view, at priority 100. This
latter allows each to trigger before the default mvc rendering strategy,
and for them to trigger in the order they are registered.
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::registerMvcRenderingStrategies() |
Parameters
Register additional view strategies
registerViewStrategies() : void
Inherited
If there is a "strategies" key of the view manager configuration, loop
through it. Pull each as a service from the service manager, and, if it
is a ListenerAggregate, attach it to the view, at priority 100. This
latter allows each to trigger before the default strategy, and for them
to trigger in the order they are registered.
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::registerViewStrategies() |
Extract view manager configuration from the application's configuration
loadConfig(array | \ArrayAccess $configService) : array
Parameters
$configService
array\ArrayAccess
Returns
array
Properties
<p>application configuration service</p>
$config : object
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$config |
$event
$event : \Zend\Mvc\MvcEvent
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$event |
$exceptionStrategy
$exceptionStrategy
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$exceptionStrategy |
$helperManager
$helperManager
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$helperManager |
$listeners
$listeners : \Zend\Stdlib\CallbackHandler[]
Inherited
| inherited_from |
\Zend\EventManager\AbstractListenerAggregate::$$listeners |
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$listeners |
$mvcRenderingStrategy
$mvcRenderingStrategy
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$mvcRenderingStrategy |
$renderer
$renderer
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$renderer |
$rendererStrategy
$rendererStrategy
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$rendererStrategy |
$resolver
$resolver
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$resolver |
$routeNotFoundStrategy
$routeNotFoundStrategy
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$routeNotFoundStrategy |
$view
$view
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$view |
$viewModel
$viewModel
Inherited
| inherited_from |
\Zend\Mvc\View\Http\ViewManager::$$viewModel |