\Charcoal\ViewRenderer

Provides a PSR-7 renderer that uses a Charcoal View.

A "PSR-7" renderer is a service that renders a template identifier inside a HTTP Response

Dependencies

  • view A "Charcoal View", which is any class that implements \Charcoal\View\ViewInterface.

Summary

Methods
Properties
Constants
__construct()
render()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
setView()
$view
N/A

Properties

Methods

__construct()

__construct(array  $data) 

Parameters

array $data

The constructor dependencies.

render()

render(\Psr\Http\Message\ResponseInterface  $response, string  $templateIdent, mixed  $context = null) : \Psr\Http\Message\ResponseInterface

Parameters

\Psr\Http\Message\ResponseInterface $response

The HTTP response.

string $templateIdent

The template identifier to load and render.

mixed $context

The view controller / context.

Returns

\Psr\Http\Message\ResponseInterface