const classafSlim::Slim

sys::Obj
  afSlim::Slim

Non-caching service methods for parsing, compiling and rendering slim templates into HTML.

For further information on the ctx parameter, see efan: Passing Data

compileFromFile

Source

EfanRenderer compileFromFile(File slimFile, Type? ctxType := null, Type[]? viewHelpers := null)

Compiles a renderer from the given slim file.

compileFromStr

Source

EfanRenderer compileFromStr(Str slimTemplate, Type? ctxType := null, Type[]? viewHelpers := null, Uri? srcLocation := null)

Compiles a renderer from the given slim template.

srcLocation may anything - used for meta information only.

parseFromFile

Source

Str parseFromFile(File slimFile)

Parses the given slim file into an efan template.

parseFromStr

Source

Str parseFromStr(Str slimTemplate, Uri? srcLocation := null)

Parses the given slim template into an efan template.

srcLocation may anything - used for meta information only.

renderFromFile

Source

Str renderFromFile(File slimFile, Obj? ctx := null, Type[]? viewHelpers := null)

Renders the given slim template file into HTML.

renderFromStr

Source

Str renderFromStr(Str slimTemplate, Obj? ctx := null, Type[]? viewHelpers := null, Uri? srcLocation := null)

Renders the given slim template into HTML.

srcLocation may anything - used for meta information only.