Deprecated: Assigning the return value of new by reference is deprecated in /home/bluestat/public_html/source/index.php on line 477
key = $key; $this->description = $description; } // ################################################################### /** * Returns the key for the data set * * @return string */ public function getKey() { return $this->key; } // ################################################################### /** * Sets the key * * @param string $key */ public function setKey($key) { $this->key = $key; } // ################################################################### /** * Returns the description * * @return string */ public function getDescription() { return $this->description; } // ################################################################### /** * Sets the description * * @param string $description */ public function setDescription($description) { $this->description = $description; } // ################################################################### /** * Checks whether or not the series already contains $val * * @param mixed $val * * @return boolean */ public function contains($val) { foreach ($this->series AS $_val) { if ($val == $_val) { return true; } } return false; } // ################################################################### /** * Adds a given value and returns TRUE if the value was added, or FALSE * if it already existed and was not added * * @return boolean */ public function add($val) { if ($this->contains($val)) { return false; } $this->series[] = $val; return true; } // ################################################################### /** * Removes a given value, returning TRUE if it was removed and FALSE * if it does not exist in the series * * @return boolean */ public function remove($val) { foreach ($this->series AS $_key => $_val) { if ($val == $_val) { unset($this->series[$_key]); return true; } } return false; } } ?>