class Template

Template.

Traits

Better OOP experience.

Properties

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

Methods

__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name)

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()

Renders template.

createTemplate(string $name, array $params, string $referenceType)

Renders template.

void
renderToContentType(string|Closure $mod)

No description

void
prepare()

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.

Details

at line 60
__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name)

Parameters

Engine $engine
array $params
FilterExecutor $filters
array $providers
string $name

at line 73
Engine getEngine()

Return Value

Engine

at line 79
string getName()

Return Value

string

at line 88
array getParameters()

Returns array of all parameters.

Return Value

array

at line 98
mixed getParameter(string $name)

Returns parameter.

Parameters

string $name

Return Value

mixed

at line 107
string getContentType()

Return Value

string

at line 113
string|null getParentName()

Return Value

string|null

at line 119
Template|null getReferringTemplate()

Return Value

Template|null

at line 125
string|null getReferenceType()

Return Value

string|null

at line 135
void render()

Renders template.

Return Value

void

at line 187
Template createTemplate(string $name, array $params, string $referenceType)

Renders template.

Parameters

string $name
array $params
string $referenceType

Return Value

Template

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

Parameters

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

Return Value

void

at line 230
void prepare()

Return Value

void

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

Renders block.

Parameters

string $name
array $params
$mod

Return Value

void

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

Renders parent block.

Parameters

string $name
array $params

Return Value

void

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

Parameters

string $current
string $name

Return Value

void

at line 294
string capture(callable $function)

Captures output to string.

Parameters

callable $function

Return Value

string