Class miTemplateParserSectionInfo

Description

Template parser section

  • copyright: Copyright (c) 2003-2007 Mirchev Ideas Ltd. All rights reserved.

Located in /util/TemplateParser.php (line 14)


	
			
Variable Summary
Method Summary
miTemplateParserSectionInfo __construct ([string $sectionName = ''], [int $iterationsCount = 1], [array $values = array()])
void addSubsectionsArray (string $subsectionName, array $subsections)
void addValues (array $values)
void setIterationsCount (int $iterationsCount)
void setSectionInfo (string $sectionName, int $iterationsCount, [array $values = array()])
void setSectionName (string $sectionName)
void setValues (array $values)
Variables
mixed $_iterationsCount (line 17)
  • access: public
mixed $_sectionName (line 16)
  • access: public
mixed $_subsections = array() (line 23)

Associative array with the subsections. The key is the subsection name

  • access: public
mixed $_values (line 18)
  • access: public
Methods
Constructor __construct (line 34)

Constructs the object All params are optional

  • see: setSectionInfo for an example
  • access: public
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
addSubsection (line 111)

Adds a subsection to this section.

In the template the subsection must be inside this section

  • access: public
void addSubsection (miTemplateParserSectionInfo $subsection)
addSubsectionsArray (line 123)

Adds subsections array The number of subsections must match the number of iterations of the outer section

  • access: public
void addSubsectionsArray (string $subsectionName, array $subsections)
  • string $subsectionName
  • array $subsections
addValues (line 100)

Adds section values

  • see: setSectionInfo for more info
  • access: public
void addValues (array $values)
  • array $values: array of arrays with the values
setIterationsCount (line 78)

Set the number of times this section will be repated

  • access: public
void setIterationsCount (int $iterationsCount)
  • int $iterationsCount: the number of times this section will be repeated
setSectionInfo (line 56)

Sets up the section

Example:

  1.  $values array(
  2.      'VariableName' => 'VariableValue',
  3.      'VariableName2' => 'VariableValue2',
  4.      'VariableName3' => array('Value1''Value2''Value3''Value4'),
  5.  );
  6.  setSectionInfo('testSection'4$values);

  • access: public
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
setSectionName (line 68)

Sets the section name

  • access: public
void setSectionName (string $sectionName)
  • string $sectionName: the name of the section as named in the template
setValues (line 89)

Sets the section values

  • see: setSectionInfo for more info
  • access: public
void setValues (array $values)
  • array $values: array of arrays with the values

Documentation generated on Thu, 08 May 2008 16:57:50 +0300 by phpDocumentor 1.4.1