name = $n;
$this->nsections = 0;
}
//--------------------------------------------------
// Adds a new section to the class.
//--------------------------------------------------
function addSection($l, $p, $s, $e, $d)
{
$this->sections[$this->nsections] = new Section($l, $p, $s, $e, $d);
$this->nsections++;
}
/**
* \brief
* Adds an already-instantiated section to this class.
*/
public function section_add(Section $section)
{
$this->sections[$this->nsections] = $section;
$this->nsections ++;
}
//--------------------------------------------------
// Returns the number of sections in the class.
//--------------------------------------------------
function getnsections()
{
return $this->nsections;
}
//--------------------------------------------------
// Returns the desired section for analysis.
//--------------------------------------------------
function getSection($i)
{
// Checks to make sure the desired section is part of the set.
if(isset($this->sections[$i]))
{
//echo "Object sections[$i] was set
";
} else {
echo "Object sections[$i] was NOT set
";
}
$result = $this->sections[$i];
return $result;
}
//--------------------------------------------------
// Returns the name of the class.
//--------------------------------------------------
function getName()
{
return $this->name;
}
/**
* \brief
* Renders this Classes into something suitable for input.php.
*/
function input_form_render($class_key)
{
$n = "\n";
$out = '