id = $id; $this->label = $label; $this->from = $from; $this->to = $to; $this->yearly = $yearly; } /** * Id. * * @return string */ public function get_id() { return $this->id; } /** * Label; may be empty. * * @return string */ public function get_label() { return $this->label; } /** * First closed date, `Y-m-d`. * * @return string */ public function get_from() { return $this->from; } /** * Last closed date, `Y-m-d`. * * @return string */ public function get_to() { return $this->to; } /** * Whether it repeats every year. * * @return bool */ public function is_yearly() { return $this->yearly; } /** * The closure as stored. * * @return array{id: string, label: string, from: string, to: string, yearly: bool} */ public function to_array() { return array( 'id' => $this->id, 'label' => $this->label, 'from' => $this->from, 'to' => $this->to, 'yearly' => $this->yearly, ); } }