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, Policy|null $policy)
No description
string
getName()
No description
array
getParameters()
Returns array of all parameters.
mixed
getParameter(string $name)
Returns parameter.
array
getBlockNames()
No description
string
getContentType()
No description
string|null
getParentName()
No description
Template|null
getReferringTemplate()
No description
string|null
getReferenceType()
No description
void
render(string|null $block = null)
Renders template.
createTemplate(string $name, array $params, string $referenceType)
Renders template.
void
void
prepare()
No description
array
main()
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.
mixed
call(mixed $callable)
No description
mixed
prop(mixed $obj, mixed $prop)
No description
Details
at line 68
__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name, Policy|null $policy)
No description
at line 88
Engine
getEngine()
No description
at line 94
string
getName()
No description
at line 104
array
getParameters()
Returns array of all parameters.
at line 114
mixed
getParameter(string $name)
Returns parameter.
at line 123
array
getBlockNames()
No description
at line 129
string
getContentType()
No description
at line 135
string|null
getParentName()
No description
at line 141
Template|null
getReferringTemplate()
No description
at line 147
string|null
getReferenceType()
No description
at line 157
void
render(string|null $block = null)
internal |
Renders template.
at line 208
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 236
void
renderToContentType(string|Closure $mod)
internal |
No description
at line 258
void
prepare()
internal |
No description
at line 267
array
main()
internal |
No description
at line 282
void
renderBlock(string $name, array $params, string|Closure $mod = null)
internal |
Renders block.
at line 312
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 323
protected void
checkBlockContentType(string $current, string $name)
internal |
No description
at line 343
string
capture(callable $function)
internal |
Captures output to string.
at line 367
protected mixed
call(mixed $callable)
internal |
No description
at line 400
protected mixed
prop(mixed $obj, mixed $prop)
internal |
No description
Traits
Better OOP experience.