Zend Framework
3.0
|
Public Member Functions | |
setRequest (Request $request) | |
Set MVC request object. | |
setResponse (Response $response) | |
Set MVC response object. | |
getRequest () | |
Get MVC request object. | |
getResponse () | |
Get MVC response object. | |
setEventManager (EventManagerInterface $events) | |
Set the event manager instance. | |
getEventManager () | |
Retrieve the event manager instance. | |
addRenderingStrategy ($callable, $priority=1) | |
Add a rendering strategy. | |
addResponseStrategy ($callable, $priority=1) | |
Add a response strategy. | |
render (Model $model) | |
Render the provided model. | |
Protected Member Functions | |
renderChildren (Model $model) | |
Loop through children, rendering each. | |
getEvent () | |
Create and return ViewEvent used by render() | |
Protected Attributes | |
$events | |
$request | |
$response | |
addRenderingStrategy | ( | $callable, | |
$priority = 1 |
|||
) |
Add a rendering strategy.
Expects a callable. Strategies should accept a ViewEvent object, and should return a Renderer instance if the strategy is selected.
Internally, the callable provided will be subscribed to the "renderer" event, at the priority specified.
callable | $callable | |
int | $priority |
addResponseStrategy | ( | $callable, | |
$priority = 1 |
|||
) |
Add a response strategy.
Expects a callable. Strategies should accept a ViewEvent object. The return value will be ignored.
Typical usages for a response strategy are to populate the Response object.
Internally, the callable provided will be subscribed to the "response" event, at the priority specified.
callable | $callable | |
int | $priority |
getEventManager | ( | ) |
Retrieve the event manager instance.
Lazy-loads a default instance if none available
Implements EventsCapableInterface.
getRequest | ( | ) |
Get MVC request object.
getResponse | ( | ) |
Get MVC response object.
render | ( | Model | $model | ) |
Render the provided model.
Internally, the following workflow is used:
renderer(ViewEvent) response(ViewEvent)
Model | $model |
Exception\RuntimeException |
|
protected |
Loop through children, rendering each.
Model | $model |
Exception\DomainException |
setEventManager | ( | EventManagerInterface | $events | ) |
Set the event manager instance.
EventManagerInterface | $events |
Implements EventManagerAwareInterface.
setRequest | ( | Request | $request | ) |
setResponse | ( | Response | $response | ) |
|
protected |
|
protected |
|
protected |