public function getValue() { $total = 0; foreach ($this->values as $value) { $total = $total + $value; } return $total; }