diff --git a/class.class.php b/class.class.php new file mode 100644 --- /dev/null +++ b/class.class.php @@ -0,0 +1,70 @@ +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; + } +} + +?> \ No newline at end of file