Exemplo n.º 1
0
 /**
  * @param ImportedGuide $source
  * @param Guide $destination
  * @return mixed
  */
 public function map($source, $destination)
 {
     $destination->setMaxBreakfastPrice($source->getBreakfast());
     $destination->setMinBreakfastPrice($source->getBreakfastMin());
     $destination->setMaxDoublePrice($source->getRoomDoubleMax());
     $destination->setMinDoublePrice($source->getRoomDoubleMin());
     $destination->setMaxFamilyPrice($source->getRoomFamilyMax());
     $destination->setMinFamilyPrice($source->getRoomFamilyMin());
     $destination->setMaxSinglePrice($source->getRoomSingleMax());
     $destination->setMinSinglePrice($source->getRoomSingleMin());
     $destination->setMaxSuitePrice($source->getRoomSuiteMax());
     $destination->setMinSuitePrice($source->getRoomSuiteMin());
     $destination->setNewHotel($source->getNewHotel());
     if ($source->getDescription()) {
         $translations = array('fr' => $source->getDescription()->getFr(), 'en' => $source->getDescription()->getEn(), 'de' => $source->getDescription()->getDe(), 'es' => $source->getDescription()->getEs(), 'it' => $source->getDescription()->getIt(), 'nl' => $source->getDescription()->getNl());
         $this->translateProperty($destination, 'description', $translations);
     }
     return $destination;
 }