public function setRecurrenceCycle($cycle) { if (!in_array($cycle, $this->allowedCycle)) { throw new InvalidArgumentException('Not supported cycle "' . $cycle . '".'); } $this->recurrenceCycle = $cycle; }