2040. Class

2040.1. Zend\View\View

2040.1.1. Methods

2040.1.1.1. setRequest

setRequest()

Set MVC request object

Parameters:Request
Return type:View

2040.1.1.2. setResponse

setResponse()

Set MVC response object

Parameters:Response
Return type:View

2040.1.1.3. getRequest

getRequest()

Get MVC request object

Return type:null|Request

2040.1.1.4. getResponse

getResponse()

Get MVC response object

Return type:null|Response

2040.1.1.5. setEventManager

setEventManager()

Set the event manager instance

Parameters:EventManagerInterface
Return type:View

2040.1.1.6. getEventManager

getEventManager()

Retrieve the event manager instance

Lazy-loads a default instance if none available

Return type:EventManagerInterface

2040.1.1.7. addRenderingStrategy

addRenderingStrategy()

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.

Parameters:
  • callable
  • int
Return type:

View

2040.1.1.8. addResponseStrategy

addResponseStrategy()

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.

Parameters:
  • callable
  • int
Return type:

View

2040.1.1.9. render

render()

Render the provided model.

Internally, the following workflow is used:

  • Trigger the “renderer” event to select a renderer.
  • Call the selected renderer with the provided Model
  • Trigger the “response” event
Parameters:Model
Throws ExceptionRuntimeException:
 
Return type:void

2040.1.1.10. renderChildren

renderChildren()

Loop through children, rendering each

Parameters:Model
Throws ExceptionDomainException:
 
Return type:void

2040.1.1.11. getEvent

getEvent()

Create and return ViewEvent used by render()

Return type:ViewEvent