\Charcoal\ViewViewInterface

View Interface

Summary

Methods
Constants
loadTemplate()
render()
renderTemplate()
No constants found
No protected methods found
N/A
No private methods found
N/A

Methods

loadTemplate()

loadTemplate(string  $templateIdent) : string

Load a template (from identifier).

Parameters

string $templateIdent

The template identifier to load..

Throws

\Charcoal\View\InvalidArgumentException

If the template ident is not a string.

Returns

string

render()

render(string  $templateIdent, mixed  $context = null) : string

Load a template (from identifier) and render it.

Parameters

string $templateIdent

The template identifier, to load and render.

mixed $context

The view controller (rendering context).

Returns

string

renderTemplate()

renderTemplate(string  $templateString, mixed  $context = null) : string

Render a template (from string).

Parameters

string $templateString

The full template string to render.

mixed $context

The view controller (rendering context).

Returns

string