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 $block = null)
internal |
Renders template.
at line 231
Template
createTemplate(string $name, array $params, string $referenceType)
internal |
Renders template.
at line 261
void
renderToContentType(string|Closure|null $mod, string $block = null)
internal |
No description
at line 273
void
prepare()
internal |
No description
at line 282
array
main()
internal |
No description
at line 298
void
renderBlock(string $name, array $params, string|Closure|null $mod = null, int|string $layer = null)
internal |
Renders block.
at line 326
void
renderBlockParent(string $name, array $params)
internal |
Renders parent block.
at line 343
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 390
string
capture(callable $function)
internal |
Captures output to string.
at line 417
protected void
enterBlockLayer(int $staticId, array $vars)
No description
at line 425
protected void
copyBlockLayer()
No description
at line 433
protected void
leaveBlockLayer()
No description
at line 440
bool
hasBlock(string $name)
No description
at line 454
protected mixed
call(mixed $callable)
internal |
No description
at line 487
protected mixed
prop(mixed $obj, mixed $prop)
internal |
No description
at line 500
mixed
__get(string $name)
No description
Traits
Better OOP experience.