PebbleTemplateEngine

A template engine that uses the Pebble library.

package

Default

Methods

__construct

__construct() 

Create a template engine using defaults

create( $arg0,  $arg1 = null) : \io\vertx\jphp\ext\web\templ\pebble\PebbleTemplateEngine
static

param $vertx [Vertx] create($vertx)

Create a template engine using defaults

param $vertx [Vertx] param $extension [string] create($vertx, $extension)

Arguments

$arg0

Vertx

$arg1

string

Response

\io\vertx\jphp\ext\web\templ\pebble\PebbleTemplateEngine

the engine

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

Constants

Default template extension

DEFAULT_TEMPLATE_EXTENSION
var

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