class Engine extends Object

Templating engine Latte.

Constants

VERSION

CONTENT_HTML

Content types

CONTENT_XHTML

Content types

CONTENT_XML

Content types

CONTENT_JS

Content types

CONTENT_CSS

Content types

CONTENT_URL

Content types

CONTENT_ICAL

Content types

CONTENT_TEXT

Content types

Properties

callable[] $onCompile

Methods

void
render($name, array $params = array())

Renders template to output.

string
renderToString($name, array $params = array())

Renders template to string.

string
compile($name)

Compiles template to PHP code.

string
getCacheFile($name)

No description

addFilter($name, $callback)

Registers run-time filter.

callable[]
getFilters()

Returns all run-time filters.

mixed
invokeFilter($name, array $args)

Call a run-time filter.

addMacro($name, IMacro $macro)

Adds new macro.

setContentType($type)

No description

setTempDirectory($path)

Sets path to temporary directory.

setAutoRefresh($on = TRUE)

Sets auto-refresh mode.

getParser()

No description

getCompiler()

No description

setLoader(ILoader $loader)

No description

getLoader()

No description

Details

at line 91
void render($name, array $params = array())

Renders template to output.

Parameters

$name
array $params

Return Value

void

at line 102
string renderToString($name, array $params = array())

Renders template to string.

Parameters

$name
array $params

Return Value

string

at line 122
string compile($name)

Compiles template to PHP code.

Parameters

$name

Return Value

string

at line 198
string getCacheFile($name)

No description

Parameters

$name

Return Value

string

at line 222
Engine addFilter($name, $callback)

Registers run-time filter.

Parameters

$name
$callback

Return Value

Engine

at line 237
callable[] getFilters()

Returns all run-time filters.

Return Value

callable[]

at line 249
mixed invokeFilter($name, array $args)

Call a run-time filter.

Parameters

$name
array $args

Return Value

mixed

at line 273
Engine addMacro($name, IMacro $macro)

Adds new macro.

Parameters

$name
IMacro $macro

Return Value

Engine

at line 283
Engine setContentType($type)

No description

Parameters

$type

Return Value

Engine

at line 294
Engine setTempDirectory($path)

Sets path to temporary directory.

Parameters

$path

Return Value

Engine

at line 305
Engine setAutoRefresh($on = TRUE)

Sets auto-refresh mode.

Parameters

$on

Return Value

Engine

at line 315
Parser getParser()

No description

Return Value

Parser

at line 327
Compiler getCompiler()

No description

Return Value

Compiler

at line 341
Engine setLoader(ILoader $loader)

No description

Parameters

ILoader $loader

Return Value

Engine

at line 351
ILoader getLoader()

No description

Return Value

ILoader