$value) { $methodName = 'set' . ucfirst($name); if (method_exists($entry, $methodName)) { $entry->{$methodName}($value); } else { throw new ProgrammingError( 'Method "%s" does not exist on object of type "%s"', $methodName, __CLASS__ ); } } return $entry; } /** * Set this group's name * * @param string $name The name to set */ public function setName($name) { $this->name = $name; } /** * Return the name of this group * * @return string */ public function getName() { return $this->name; } /** * Set this group's amount of events * * @param int $value The value to set */ public function setValue($value) { $this->value = intval($value); } /** * Return the amount of events in this group * * @return int */ public function getValue() { return $this->value; } /** * Set this group's date and time * * @param DateTime $dateTime The date and time to set */ public function setDateTime(DateTime $dateTime) { $this->dateTime = $dateTime; } /** * Return the date and time of this group * * @return DateTime */ public function getDateTime() { return $this->dateTime; } /** * Set the url to this group's detail view * * @param Url $detailUrl The url to set */ public function setDetailUrl(Url $detailUrl) { $this->detailUrl = $detailUrl; } /** * Return the url to this group's detail view * * @return Url */ public function getDetailUrl() { return $this->detailUrl; } /** * Set this group's weight * * @param float $weight The weight for this group */ public function setWeight($weight) { $this->weight = floatval($weight); } /** * Return the weight of this group * * @return float */ public function getWeight() { return $this->weight; } /** * Set this group's label * * @param string $label The label to set */ public function setLabel($label) { $this->label = $label; } /** * Return the label of this group * * @return string */ public function getLabel() { return $this->label; } /** * Get the CSS class * * @return string */ public function getClass() { return $this->class; } /** * Set the CSS class * * @param string $class * * @return $this */ public function setClass($class) { $this->class = $class; return $this; } }