Template
class Template
Template.
Constants
LAYER_TOP |
|
LAYER_SNIPPET |
|
LAYER_LOCAL |
|
protected CONTENT_TYPE |
|
protected BLOCKS |
|
Properties
stdClass | $global | ||
protected array | $params | ||
protected FilterExecutor | $filters | ||
protected string|false|null | $parentName | ||
protected array[] | $varStack |
Methods
No description
No description
Returns array of all parameters.
Returns parameter.
No description
No description
No description
No description
No description
Renders template.
Renders template.
No description
No description
Renders block.
Renders parent block.
Creates block if doesn't exist and checks if content type is the same.
Captures output to string.
No description
No description
No description
No description
No description
No description
No description
Details
at line 74
__construct(Engine $engine, array $params, FilterExecutor $filters, array $providers, string $name, Policy|null $policy)
No description
at line 94
Engine
getEngine()
No description
at line 100
string
getName()
No description
at line 110
array
getParameters()
Returns array of all parameters.
at line 122
mixed
getParameter(string $name)
Returns parameter.
at line 135
array
getBlockNames(int|string $layer = self::LAYER_TOP)
No description
at line 141
string
getContentType()
No description
at line 147
string|null
getParentName()
No description
at line 153
Template|null
getReferringTemplate()
No description
at line 159
string|null
getReferenceType()
No description
at line 169
void
render(string|null $block = null)
internal |
Renders template.
at line 232
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 263
void
renderToContentType(string|Closure|null $mod, string|null $block = null)
internal |
No description
at line 275
void
prepare()
internal |
No description
at line 284
array
main()
internal |
No description
at line 300
void
renderBlock(string $name, array $params, string|Closure|null $mod = null, int|string $layer = null)
internal |
Renders block.
at line 328
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 345
protected void
addBlock(string $name, string $contentType, array $functions, int|string $layer = null)
internal |
Creates block if doesn't exist and checks if content type is the same.
at line 392
string
capture(callable $function)
internal |
Captures output to string.
at line 419
protected void
enterBlockLayer(int $staticId, array $vars)
No description
at line 427
protected void
copyBlockLayer()
No description
at line 435
protected void
leaveBlockLayer()
No description
at line 442
bool
hasBlock(string $name)
No description
at line 456
protected mixed
call(mixed $callable)
internal |
No description
at line 489
protected mixed
prop(mixed $obj, mixed $prop)
internal |
No description
at line 502
mixed
__get(string $name)
No description
Traits
Better OOP experience.