class Template

Template.

Traits

Better OOP experience.

Constants

CONTENT_TYPE

BLOCKS

Properties

stdClass $global
$blocks
protected array $params
protected FilterExecutor $filters
protected array $stacks
protected string|null|false $parentName
protected array $blockQueue
protected array $blockTypes

Methods

__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name, Policy|null $policy)

No description

getEngine()

No description

string
getName()

No description

array
getParameters()

Returns array of all parameters.

mixed
getParameter(string $name)

Returns parameter.

string
getContentType()

No description

string|null
getParentName()

No description

Template|null
getReferringTemplate()

No description

string|null
getReferenceType()

No description

void
render(string $block = null)

Renders template.

createTemplate(string $name, array $params, string $referenceType, int $stack = 0)

Renders template.

void
renderToContentType(string|Closure $mod)

No description

void
prepare()

No description

array
main()

No description

void
renderBlock(string $name, array $params, $mod = null)

Renders block.

void
renderBlockParent(string $name, array $params)

Renders parent block.

void
checkBlockContentType(string $current, string $name)

No description

string
capture(callable $function)

Captures output to string.

call($callable)

No description

prop($obj, $prop)

No description

Details

at line 68
__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name, Policy|null $policy)

Parameters

Engine $engine
array $params
FilterExecutor $filters
array $providers
string $name
Policy|null $policy

at line 93
Engine getEngine()

Return Value

Engine

at line 99
string getName()

Return Value

string

at line 108
array getParameters()

Returns array of all parameters.

Return Value

array

at line 118
mixed getParameter(string $name)

Returns parameter.

Parameters

string $name

Return Value

mixed

at line 127
string getContentType()

Return Value

string

at line 133
string|null getParentName()

Return Value

string|null

at line 139
Template|null getReferringTemplate()

Return Value

Template|null

at line 145
string|null getReferenceType()

Return Value

string|null

at line 155
void render(string $block = null)

Renders template.

Parameters

string $block

Return Value

void

at line 209
Template createTemplate(string $name, array $params, string $referenceType, int $stack = 0)

Renders template.

Parameters

string $name
array $params
string $referenceType
int $stack

Return Value

Template

at line 251
void renderToContentType(string|Closure $mod)

Parameters

string|Closure $mod content-type name or modifier closure

Return Value

void

at line 268
void prepare()

Return Value

void

at line 274
array main()

Return Value

array

at line 288
void renderBlock(string $name, array $params, $mod = null)

Renders block.

Parameters

string $name
array $params
$mod

Return Value

void

at line 311
void renderBlockParent(string $name, array $params)

Renders parent block.

Parameters

string $name
array $params

Return Value

void

at line 322
protected void checkBlockContentType(string $current, string $name)

Parameters

string $current
string $name

Return Value

void

at line 337
string capture(callable $function)

Captures output to string.

Parameters

callable $function

Return Value

string

at line 357
protected call($callable)

Parameters

$callable

at line 385
protected prop($obj, $prop)

Parameters

$obj
$prop