Overview

Namespaces

  • Charcoal
    • View
      • Mustache
      • Php
      • Twig

Classes

  • AbstractEngine
  • AbstractLoader
  • AbstractView
  • GenericView
  • Renderer
  • ViewConfig
  • ViewServiceProvider

Interfaces

  • EngineInterface
  • LoaderInterface
  • ViewableInterface
  • ViewInterface

Traits

  • ViewableTrait
  • Overview
  • Namespace
  • Class

Class Renderer

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.
Namespace: Charcoal\View
Located at Charcoal/View/Renderer.php
Methods summary
public
# __construct( array $data )

Parameters

$data
The constructor dependencies.
public Psr\Http\Message\ResponseInterface
# render( Psr\Http\Message\ResponseInterface $response, string $templateIdent, mixed $context = null )

Parameters

$response
The HTTP response.
$templateIdent
The template identifier to load and render.
$context
The view controller / context.

Returns

Psr\Http\Message\ResponseInterface
API documentation generated by ApiGen