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

Interface ViewableInterface

Defines an object as viewable, and therefore can be rendered.

Namespace: Charcoal\View
Located at Charcoal/View/ViewableInterface.php
Methods summary
public string
# __toString( )

Render the viewable object.

Render the viewable object.

Returns

string
public Charcoal\View\ViewableInterface
# setTemplateIdent( string $templateIdent )

Set the viewable object's template identifier.

Set the viewable object's template identifier.

Usually, a path to a file containing the template to be rendered at runtime.

Parameters

$templateIdent
The template ID.

Returns

Charcoal\View\ViewableInterface
Chainable
public string
# templateIdent( )

Retrieve the viewable object's template identifier.

Retrieve the viewable object's template identifier.

Returns

string
public Charcoal\View\ViewableInterface
# setView( Charcoal\View\ViewInterface $view )

Set the renderable view.

Set the renderable view.

Parameters

$view
The view instance to use to render.

Returns

Charcoal\View\ViewableInterface
Chainable
public Charcoal\View\ViewInterface
# view( )

Retrieve the renderable view.

Retrieve the renderable view.

Returns

Charcoal\View\ViewInterface
The object's View instance.
public string
# render( string $templateIdent = null )

Render the template by the given identifier.

Render the template by the given identifier.

Usually, a path to a file containing the template to be rendered at runtime.

Parameters

$templateIdent

The template to load, parse, and render. If NULL, will use the object's previously set template identifier.

Returns

string
The rendered template.
public string
# renderTemplate( string $templateString )

Render the given template from string.

Render the given template from string.

Parameters

$templateString
The template to render from string.

Returns

string
The rendered template.
API documentation generated by ApiGen