Properties

$tagName

$tagName : string

Name of this tag

Type

string

$nameProperties

$nameProperties : array

Valid properties of $smarty.section.name.xxx variable

Type

array

$itemProperties

$itemProperties : array

{section} tag has no item properties

Type

array

$isNamed

$isNamed : boolean

{section} tag has always name attribute

Type

boolean

$matchResults

$matchResults : array

Type

array

$required_attributes

$required_attributes : array

Attribute definition: Overwrites base class.

Type

array

$optional_attributes

$optional_attributes : array

Attribute definition: Overwrites base class.

Type

array

$shorttag_order

$shorttag_order : array

Attribute definition: Overwrites base class.

Type

array

$option_flags

$option_flags : array

Array of names of valid option flags

Type

array

$optionMap

$optionMap : array

Mapping array for boolqn option value

Type

array

$mapCache

$mapCache : array

Mapping array with attributes as key

Type

array

$counter

$counter : integer

counter

Type

integer

$propertyPreg

$propertyPreg : string

Preg search pattern

Type

string

$resultOffsets

$resultOffsets : array

Offsets in preg match result

Type

array

$startOffset

$startOffset : integer

Start offset

Type

integer

Methods

scanForProperties()

scanForProperties(array  $attributes, \Smarty_Internal_TemplateCompilerBase  $compiler) 

Scan sources for used tag attributes

Parameters

array $attributes
\Smarty_Internal_TemplateCompilerBase $compiler

buildPropertyPreg()

buildPropertyPreg(boolean  $named, array  $attributes) 

Build property preg string

Parameters

boolean $named
array $attributes

matchProperty()

matchProperty(string  $source) 

Find matches in source string

Parameters

string $source

matchParentTemplateSource()

matchParentTemplateSource(\Smarty_Internal_TemplateCompilerBase  $compiler) 

Find matches in all parent template source

Parameters

\Smarty_Internal_TemplateCompilerBase $compiler

compileSpecialVariable()

compileSpecialVariable(array  $args, \Smarty_Internal_TemplateCompilerBase  $compiler, array  $parameter) : string

Compiles code for the {$smarty.foreach.xxx} or {$smarty.section.xxx}tag

Parameters

array $args

array with attributes from parser

\Smarty_Internal_TemplateCompilerBase $compiler

compiler object

array $parameter

array with compilation parameter

Throws

\SmartyCompilerException

Returns

string —

compiled code

getAttributes()

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

Parameters

object $compiler

compiler object

array $attributes

attributes applied to the tag

Returns

array —

of mapped attributes for further processing

openTag()

openTag(object  $compiler, string  $openTag, mixed  $data = null) 

Push opening tag name on stack Optionally additional data can be saved on stack

Parameters

object $compiler

compiler object

string $openTag

the opening tag's name

mixed $data

optional data saved

closeTag()

closeTag(object  $compiler, array|string  $expectedTag) : mixed

Pop closing tag Raise an error if this stack-top doesn't match with expected opening tags

Parameters

object $compiler

compiler object

array|string $expectedTag

the expected opening tag names

Returns

mixed —

any type the opening tag's name or saved data

compile()

compile(array  $args, \Smarty_Internal_TemplateCompilerBase  $compiler) : string

Compiles code for the {section} tag

Parameters

array $args

array with attributes from parser

\Smarty_Internal_TemplateCompilerBase $compiler

compiler object

Throws

\SmartyCompilerException

Returns

string —

compiled code