Constructs the object All params are optional
miTemplateParserSectionInfo
__construct
([string $sectionName = ''], [int $iterationsCount = 1], [array $values = array()])
-
string
$sectionName: the name of the section as named in the template
-
int
$iterationsCount: the number of times this section will be repeated
-
array
$values: array of arrays with the values
Adds a subsection to this section.
In the template the subsection must be inside this section
Adds subsections array The number of subsections must match the number of iterations of the outer section
void
addSubsectionsArray
(string $subsectionName, array $subsections)
-
string
$subsectionName
-
array
$subsections
Adds section values
void
addValues
(array $values)
-
array
$values: array of arrays with the values
Set the number of times this section will be repated
void
setIterationsCount
(int $iterationsCount)
-
int
$iterationsCount: the number of times this section will be repeated
Sets up the section
Example:
$values = array(
'VariableName' => 'VariableValue',
'VariableName2' => 'VariableValue2',
'VariableName3' => array('Value1', 'Value2', 'Value3', 'Value4'),
);
void
setSectionInfo
(string $sectionName, int $iterationsCount, [array $values = array()])
-
string
$sectionName: the name of the section as named in the template
-
int
$iterationsCount: the number of times this section will be repeated
-
array
$values: array of arrays with the values
Sets the section name
void
setSectionName
(string $sectionName)
-
string
$sectionName: the name of the section as named in the template
Sets the section values
void
setValues
(array $values)
-
array
$values: array of arrays with the values