$templateIdent
$templateIdent : string
The object's template identifier.
Implementation, as trait, of the {@see \Charcoal\View\ViewableInterface}.
$viewController : \Charcoal\View\ViewableInterface
The context for the {@see self::$view} to render templates.
$view : \Charcoal\View\ViewInterface
The renderable view.
setTemplateIdent(string $templateIdent) : \Charcoal\View\ViewableInterface
Set the template identifier for this viewable object.
Usually, a path to a file containing the template to be rendered at runtime.
string | $templateIdent | The template ID. |
If the template identifier is not a string.
Chainable
setView(\Charcoal\View\ViewInterface|array $view) : \Charcoal\View\ViewableInterface
Set the renderable view.
\Charcoal\View\ViewInterface|array | $view | The view instance to use to render. |
If the view parameter is not an array or a View object.
Chainable
view() : \Charcoal\View\ViewInterface
Retrieve the renderable view.
The object's View instance.
render(string $templateIdent = null) : string
Render the template by the given identifier.
Usually, a path to a file containing the template to be rendered at runtime.
string | $templateIdent | The template to load, parse, and render. If NULL, will use the object's previously set template identifier. |
The rendered template.
setViewController(\Charcoal\View\ViewableInterface|object|array|null $controller) : \Charcoal\View\ViewableInterface
Set a view controller for the template's context.
\Charcoal\View\ViewableInterface|object|array|null | $controller | A view controller to use when rendering. |
If the controller is invalid.
Chainable
viewController() : \Charcoal\View\ViewableInterface
Retrieve a view controller for the template's context.
If no controller has been defined, it will return itself.