$required_attributes
$required_attributes : array
Array of names of required attribute required by tag
Smarty Internal Plugin Compile For Class
getAttributes(object $compiler, array $attributes) : array
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
object | $compiler | compiler object |
array | $attributes | attributes applied to the tag |
of mapped attributes for further processing
closeTag(object $compiler, array|string $expectedTag) : mixed
Pop closing tag
Raise an error if this stack-top doesn't match with expected opening tags
object | $compiler | compiler object |
array|string | $expectedTag | the expected opening tag names |
any type the opening tag's name or saved data
compile(array $args, object $compiler, array $parameter) : string
Compiles code for the {for} tag
Smarty 3 does implement two different sytaxes:
{for $var in $array} For looping over arrays or iterators
{for $x=0; $x<$y; $x++} For general loops
The parser is gereration different sets of attribute by which this compiler can determin which syntax is used.
array | $args | array with attributes from parser |
object | $compiler | compiler object |
array | $parameter | array with compilation parameter |
compiled code