コード例 #1
0
 /**
  * @param Driver $driver
  * @return DriverListDTO
  */
 public function driverToDriverListDTO(Driver $driver)
 {
     $driverListDTO = new DriverListDTO();
     $driverListDTO->id = $driver->getId();
     $driverListDTO->gender = $driver->getGenderAsString();
     $driverListDTO->firstname = $driver->getFirstname();
     $driverListDTO->telephone = $driver->getTelephone();
     $driverListDTO->lastname = $driver->getLastname();
     $driverListDTO->street = $driver->getAddress()->getStreet();
     $driverListDTO->city = $driver->getAddress()->getCity();
     $driverListDTO->driverCategory = $driver->getDriverCategory()->getName();
     $driverListDTO->wheelChairAttendance = $driver->getWheelChairAttendanceAsString();
     return $driverListDTO;
 }