class Template extends Template

Properties

private $env from  Template
private array $lastCompiled

A stack of the last compiled templates.

from  Template
protected $path from  Template
protected $page from  Template
protected $layout from  Template
protected $theme from  Template
protected $param from  Template
protected $controller from  Template
protected $session from  Template

Methods

__construct(Environment $env, $path)

This method is for internal use only and should never be called directly (use Environment::load() instead).

from  Template
string
render(array $data = [])

Renders the template.

from  Template
mergeGlobals($data)

No description

from  Template
getContents($data)

No description

from  Template
array
gatherData($data)

Get the data bound to the view instance.

from  Template
evaluatePath($path, $data)

No description

from  Template
handleException($ex, $level)

No description

from  Template
string
getMessage(Exception $e)

Get the exception message for an exception.

from  Template
getSourceFilePath()

No description

from  Template

Details

in Template at line 43
__construct(Environment $env, $path)

internal  
 

This method is for internal use only and should never be called directly (use Environment::load() instead).

Parameters

Environment $env
$path

in Template at line 58
string render(array $data = [])

Renders the template.

Parameters

array $data

An array of parameters to pass to the template

Return Value

string

The rendered template

Exceptions

Exception
Throwable

in Template at line 73
protected mergeGlobals($data)

No description

Parameters

$data

in Template at line 83
protected getContents($data)

No description

Parameters

$data

in Template at line 94
protected array gatherData($data)

Get the data bound to the view instance.

Parameters

$data

Return Value

array

in Template at line 106
protected evaluatePath($path, $data)

No description

Parameters

$path
$data

in Template at line 134
protected handleException($ex, $level)

No description

Parameters

$ex
$level

in Template at line 151
protected string getMessage(Exception $e)

Get the exception message for an exception.

Parameters

Exception $e

Return Value

string

in Template at line 156
protected getSourceFilePath()

No description