/** * @param Passenger $passenger * @return PassengerListDTO */ public function passengerToPassengerListDTO(Passenger $passenger) { $passengerListDTO = new PassengerListDTO(); $passengerListDTO->id = $passenger->getId(); $passengerListDTO->gender = $passenger->getGenderAsString(); $passengerListDTO->firstname = $passenger->getFirstname(); $passengerListDTO->telephone = $passenger->getTelephone(); $passengerListDTO->lastname = $passenger->getLastname(); $passengerListDTO->street = $passenger->getAddress()->getStreet(); $passengerListDTO->city = $passenger->getAddress()->getCity(); $passengerListDTO->isInWheelChair = $passenger->getIsInWheelChairAsString(); $passengerListDTO->hasMonthlyBilling = $passenger->getMonthlyBillingAsString(); $passengerListDTO->insurances = $passenger->getInsurancesAsString(); return $passengerListDTO; }