class Template (View source)

Handle front end templating

Constants

TEMPLATES_FOLDER

Properties

static protected Environment $twig

Twig environment

Methods

__construct()

No description

static Environment
getTwigEnvironment(string|null $cacheDir)

No description

string
render(string $template, array $data = [])

No description

Details

__construct()

No description

static Environment getTwigEnvironment(string|null $cacheDir)

No description

Parameters

string|null $cacheDir

Return Value

Environment

string render(string $template, array $data = [])

No description

Parameters

string $template

Template path name

array $data

Associative array of template variables

Return Value

string

Exceptions

Throwable
LoaderError
RuntimeError
SyntaxError