Zend\View\Renderer\PhpRenderer::render
Processes a view script and returns the output.
Signature
Parameters
$nameOrModel
—
object
- Either the template to use, or a
ViewModel. The ViewModel must have the
template as an option in order to be
valid.
$values
—
object
- Values to use when rendering. If none
provided, uses those in the composed
variables container.
Returns
- string
- The script output.
Errors/Exceptions
-
DomainException
- if a ViewModel is passed, but does not
-
InvalidArgumentException
- if the values passed are not
-
RuntimeException
- if the template cannot be rendered
Defined by Interface
RendererInterface