protected function addOccurrence($occurrences) { foreach ($occurrences as $occurrence) { // make sure that this occurrence isn't already in the list if (!in_array($occurrence, $this->occurrences)) { $this->occurrences[] = $occurrence; } } }