TemplateEngine

A template template uses a specific template and the data in a routing context to render a resource into a buffer.

Concrete implementations exist for several well-known template engines.

package

Default

Methods

__construct

__construct() 

Returns true if the template template caches template files. If false, then template files are freshly loaded each time they are used.

isCachingEnabled() : boolean

Response

boolean

True if template files are cached; otherwise, false.

Render the template. Template engines that support partials/fragments should extract the template base path from the template filename up to the last file separator.

render( $arg0,  $arg1,  $arg2) : void

Some engines support localization, for these engines, there is a predefined key "lang" to specify the language to be used in the localization, the format should follow the standard locale formats e.g.: "en-gb", "pt-br", "en".

Arguments

$arg0

array

$arg1

string

$arg2

callable