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.
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 117
getParameter(string $name)
deprecated
deprecated
No description
at line 131
array
getBlockNames(int|string $layer = self::LAYER_TOP)
No description
at line 137
string
getContentType()
No description
at line 143
string|null
getParentName()
No description
at line 149
Template|null
getReferringTemplate()
No description
at line 155
string|null
getReferenceType()
No description
at line 165
void
render(string|null $block = null)
internal |
Renders template.
at line 226
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 257
void
renderToContentType(string|Closure|null $mod, string|null $block = null)
internal |
No description
at line 269
void
prepare()
internal |
No description
at line 278
array
main()
internal |
No description
at line 294
void
renderBlock(string $name, array $params, string|Closure|null $mod = null, int|string $layer = null)
internal |
Renders block.
at line 322
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 339
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 386
string
capture(callable $function)
internal |
Captures output to string.
at line 413
protected void
enterBlockLayer(int $staticId, array $vars)
No description
at line 421
protected void
copyBlockLayer()
No description
at line 429
protected void
leaveBlockLayer()
No description
at line 436
bool
hasBlock(string $name)
No description
at line 450
protected mixed
call(mixed $callable)
internal |
No description
at line 483
protected mixed
prop(mixed $obj, mixed $prop)
internal |
No description
at line 496
mixed
__get(string $name)
No description
Traits
Better OOP experience.