records as &$record) { $record += $this->defaults; $this->formatWriteValues($record); $this->matchExisting($record); if (empty($record['id'])) { $this->fillDefaults($record); } } $this->validateValues(); $resultArray = $this->writeObjects($this->records); $result->exchangeArray($resultArray); } }