class Template implements Template

Latte powered template.

Methods

__construct(Engine $latte)

No description

Engine
getLatte()

No description

void
render(string|null $file = null, array $params = [])

Renders template to output.

string
renderToString(string|null $file = null, array $params = [])

Renders template to output.

string
__toString()

Renders template to string.

addFilter(string|null $name, callable $callback)

Registers run-time filter.

addFunction(string $name, callable $callback)

Registers run-time function.

setTranslator(Translator|null $translator, string|null $language = null)

Sets translate adapter.

setFile(string $file)

Sets the path to the template file.

string|null
getFile()

Returns the path to the template file.

array
getParameters()

Returns array of all parameters.

void
blueprint(string|null $parentClass = null)

No description

__wakeup()

Prevents unserialization.

Details

at line 25
__construct(Engine $latte)

No description

Parameters

Engine $latte

at line 31
final Engine getLatte()

No description

Return Value

Engine

at line 40
void render(string|null $file = null, array $params = [])

Renders template to output.

Parameters

string|null $file
array $params

Return Value

void

at line 53
string renderToString(string|null $file = null, array $params = [])

Renders template to output.

Parameters

string|null $file
array $params

Return Value

string

at line 63
string __toString()

Renders template to string.

Return Value

string

at line 75
Template addFilter(string|null $name, callable $callback)

Registers run-time filter.

Parameters

string|null $name
callable $callback

Return Value

Template

at line 85
Template addFunction(string $name, callable $callback)

Registers run-time function.

Parameters

string $name
callable $callback

Return Value

Template

at line 95
Template setTranslator(Translator|null $translator, string|null $language = null)

Sets translate adapter.

Parameters

Translator|null $translator
string|null $language

Return Value

Template

at line 117
Template setFile(string $file)

Sets the path to the template file.

Parameters

string $file

Return Value

Template

at line 124
final string|null getFile()

Returns the path to the template file.

Return Value

string|null

at line 133
final array getParameters()

Returns array of all parameters.

Return Value

array

at line 146
void blueprint(string|null $parentClass = null)

No description

Parameters

string|null $parentClass

Return Value

void

at line 155
final __wakeup()

Prevents unserialization.