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++; } //-------------------------------------------------- // 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 = '' . $n . ' ' . $n . ' ' . $n . '
' . $n . '
' . $n . "\n"; foreach ($this->sections as $key => $section) $out .= $section->input_form_render($class_key, $key); return $out; } }