Smarty_Internal_Compile_Section
Smarty Internal Plugin Compile Section Class
- Full name:
\Smarty_Internal_Compile_Section
- Parent class:
\Smarty_Internal_Compile_Private_ForeachSection
Properties
required_attributes
Attribute definition: Overwrites base class.
See Also:
- \Smarty_Internal_CompileBase -
shorttag_order
Attribute definition: Overwrites base class.
See Also:
- \Smarty_Internal_CompileBase -
optional_attributes
Attribute definition: Overwrites base class.
See Also:
- \Smarty_Internal_CompileBase -
counter
counter
tagName
Name of this tag
nameProperties
Valid properties of $smarty.section.name.xxx variable
itemProperties
{section} tag has no item properties
isNamed
{section} tag has always name attribute
Methods
compile
Compiles code for the {section} tag
Parameters:
Parameter | Type | Description |
---|---|---|
$args |
array | array with attributes from parser |
$compiler |
\Smarty_Internal_TemplateCompilerBase | compiler object |
Return Value:
compiled code
Throws:
Inherited methods
getAttributes
This function checks if the attributes passed are valid The attributes passed for the tag to compile are checked against the list of required and optional attributes. Required attributes must be present. Optional attributes are check against the corresponding list. The keyword '_any' specifies that any attribute will be accepted as valid
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
object | compiler object |
$attributes |
array | attributes applied to the tag |
Return Value:
of mapped attributes for further processing
openTag
Push opening tag name on stack Optionally additional data can be saved on stack
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
object | compiler object |
$openTag |
string | the opening tag's name |
$data |
mixed | optional data saved |
closeTag
Pop closing tag Raise an error if this stack-top doesn't match with expected opening tags
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
object | compiler object |
$expectedTag |
array|string | the expected opening tag names |
Return Value:
any type the opening tag's name or saved data
scanForProperties
Scan sources for used tag attributes
Parameters:
Parameter | Type | Description |
---|---|---|
$attributes |
array | |
$compiler |
\Smarty_Internal_TemplateCompilerBase |
Throws:
buildPropertyPreg
Build property preg string
Parameters:
Parameter | Type | Description |
---|---|---|
$named |
bool | |
$attributes |
array |
matchProperty
Find matches in source string
Parameters:
Parameter | Type | Description |
---|---|---|
$source |
string |
matchTemplateSource
Find matches in template source
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
\Smarty_Internal_TemplateCompilerBase |
matchParentTemplateSource
Find matches in all parent template source
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
\Smarty_Internal_TemplateCompilerBase |
Throws:
matchBlockSource
Find matches in {block} tag source
Parameters:
Parameter | Type | Description |
---|---|---|
$compiler |
\Smarty_Internal_TemplateCompilerBase |
compileSpecialVariable
Compiles code for the {$smarty.foreach.xxx} or {$smarty.section.xxx}tag
public compileSpecialVariable(array $args, \Smarty_Internal_TemplateCompilerBase $compiler, array $parameter): string
Parameters:
Parameter | Type | Description |
---|---|---|
$args |
array | array with attributes from parser |
$compiler |
\Smarty_Internal_TemplateCompilerBase | compiler object |
$parameter |
array | array with compilation parameter |
Return Value:
compiled code
Throws:
Automatically generated on 2025-03-18