Esempio n. 1
0
 public function hydrate(CarEntity $entity, $data)
 {
     if (isset($data['name'])) {
         $entity->setName($data['name']);
     }
     if (isset($data['manufacturer'])) {
         $entity->setManufacturer($data['manufacturer']);
     }
     if (isset($data['colour'])) {
         $entity->setColour($data['colour']);
     }
     if (isset($data['airConditioning'])) {
         $entity->setAirConditioning($data['airConditioning']);
     }
     if (isset($data['centralLocking'])) {
         $entity->setCentralLocking($data['centralLocking']);
     }
     if (isset($data['created'])) {
         $entity->setCreated($data['created']);
     }
     if (isset($data['updated'])) {
         $entity->setUpdated($data['updated']);
     }
 }