Exemplo n.º 1
0
 /**
  * @param Custodian $custodian
  * @return CustodianRegisterDTO
  */
 public function custodianToCustodianRegisterDTO(Custodian $custodian)
 {
     $custodianDTO = new CustodianRegisterDTO();
     $custodianDTO->person_id = $custodian->getId();
     $custodianDTO->gender = $custodian->getGender();
     $custodianDTO->title = $custodian->getTitle();
     $custodianDTO->firstname = $custodian->getFirstname();
     $custodianDTO->lastname = $custodian->getLastname();
     $custodianDTO->telephone = $custodian->getTelephone();
     $custodianDTO->email = $custodian->getEmail();
     $custodianDTO->entryDate = $custodian->getEntryDate();
     $custodianDTO->birthday = $custodian->getBirthday();
     $custodianDTO->extraMinutes = $custodian->getExtraMinutes();
     $custodianDTO->details = $custodian->getDetails();
     $custodianDTO->isAuthorizedToRide = $custodian->getisAuthorizedToRide();
     $custodianDTO->building = $custodian->getAddress()->getBuilding();
     $custodianDTO->lookaheadaddress = $this->addressAssembler->addressToAddressLookaheadDTO($custodian->getAddress());
     return $custodianDTO;
 }