HandlebarsTemplateEngine

A template engine that uses the Handlebars library.

package

Default

Methods

__construct

__construct() 

Create a template engine using defaults

create( $arg0) : \io\vertx\jphp\ext\web\templ\handlebars\HandlebarsTemplateEngine
static

Arguments

$arg0

Vertx

Response

\io\vertx\jphp\ext\web\templ\handlebars\HandlebarsTemplateEngine

the engine

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

setExtension

setExtension( $arg0) : $this
deprecated

Arguments

$arg0

string

Response

$this

a reference to this for fluency

Set the max cache size for the engine

setMaxCacheSize( $arg0) : $this

Arguments

$arg0

integer

Response

$this

a reference to this for fluency

Constants

Default max number of templates to cache

DEFAULT_MAX_CACHE_SIZE
var

php文件只是为了写代码方便,常量的实际值请参考原java文件

Default template extension

DEFAULT_TEMPLATE_EXTENSION
var

php文件只是为了写代码方便,常量的实际值请参考原java文件