class Template

Template.

Properties

stdClass $global
protected string $contentType
protected array $params
protected FilterExecutor $filters
protected array $blocks
protected string|false|null $parentName
protected array $blockQueue
protected array $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, string|Closure $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)

No description

Parameters

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

at line 73
Engine getEngine()

No description

Return Value

Engine

at line 79
string getName()

No description

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

No description

Return Value

string

at line 113
string|null getParentName()

No description

Return Value

string|null

at line 119
Template|null getReferringTemplate()

No description

Return Value

Template|null

at line 125
string|null getReferenceType()

No description

Return Value

string|null

at line 135
void render()

internal  
 

Renders template.

Return Value

void

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

internal  
 

Renders template.

Parameters

string $name
array $params
string $referenceType

Return Value

Template

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

internal  
 

No description

Parameters

string|Closure $mod

content-type name or modifier closure

Return Value

void

at line 235
void prepare()

internal  
 

No description

Return Value

void

at line 248
void renderBlock(string $name, array $params, string|Closure $mod = null)

internal  
 

Renders block.

Parameters

string $name
array $params
string|Closure $mod

content-type name or modifier closure

Return Value

void

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

internal  
 

Renders parent block.

Parameters

string $name
array $params

Return Value

void

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

internal  
 

No description

Parameters

string $current
string $name

Return Value

void

at line 301
string capture(callable $function)

internal  
 

Captures output to string.

Parameters

callable $function

Return Value

string

Traits

Better OOP experience.