/** * Removes a day from the list of days, if added before * @param Day $day */ function RemoveDay(Day $day) { $result = array(); foreach ($this->days as $currentDay) { if ($currentDay->DayOfWeek != $day->DayOfWeek()) { $result[] = $currentDay; } } $this->days = $result; }