Template
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
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
void
prepare()
No description
void
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
at line 73
Engine
getEngine()
No description
at line 79
string
getName()
No description
at line 88
array
getParameters()
Returns array of all parameters.
at line 98
mixed
getParameter(string $name)
Returns parameter.
at line 107
string
getContentType()
No description
at line 113
string|null
getParentName()
No description
at line 119
Template|null
getReferringTemplate()
No description
at line 125
string|null
getReferenceType()
No description
at line 135
void
render()
internal |
Renders template.
at line 187
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 215
void
renderToContentType(string|Closure $mod)
internal |
No description
at line 235
void
prepare()
internal |
No description
at line 248
void
renderBlock(string $name, array $params, string|Closure $mod = null)
internal |
Renders block.
at line 273
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 286
protected void
checkBlockContentType(string $current, string $name)
internal |
No description
at line 301
string
capture(callable $function)
internal |
Captures output to string.
Traits
Better OOP experience.