PHP Class Zend\Mvc\View\Http\InjectViewModelListener

Inheritance: extends Zend\EventManager\AbstractListenerAggregate
Show file Open project: zendframework/zend-mvc

Public Methods

Method Description
attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 ) {@inheritDoc}
injectViewModel ( MvcEvent $e ) : void Insert the view model into the event

Method Details

attach() public method

{@inheritDoc}
public attach ( Zend\EventManager\EventManagerInterface $events, $priority = 1 )
$events Zend\EventManager\EventManagerInterface

injectViewModel() public method

Inspects the MVC result; if it's a view model, it then either (a) adds it as a child to the default, composed view model, or (b) replaces it if the result is marked as terminable.
public injectViewModel ( MvcEvent $e ) : void
$e Zend\Mvc\MvcEvent
return void