setId($record->getOtherAppId()); $destinationRecord->setOtherAppId($record->getId()); $destinationRecord->setModifiedTime($record->getOtherAppModifiedTime()); $destinationRecord->setOtherAppModifiedTIme($record->getModifiedTime()); $destinationRecordList[] = $destinationRecord; } return $destinationRecordList; } public function transformToSourceRecord($targetRecords){ $sourceRcordList = array(); foreach($targetRecords as $record){ $sourceRecord = clone $record; $sourceRecord->setId($record->getOtherAppId()) ->setOtherAppId($record->getId()) ->setModifiedTime($record->getOtherAppModifiedTime()) ->setOtherAppModifiedTIme($record->getModifiedTime()); $sourceRcordList[] = $sourceRecord; } return $sourceRcordList; } } ?>