/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, * TYPE_NUM. The default key type is the column's phpname (e.g. 'authorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ApplicationPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setAppUid($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setAppNumber($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setAppParent($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setAppStatus($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setProUid($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setAppProcStatus($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setAppProcCode($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setAppParallel($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setAppInitUser($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setAppCurUser($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setAppCreateDate($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setAppInitDate($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setAppFinishDate($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setAppUpdateDate($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setAppData($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setAppPin($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setAppDuration($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setAppDelayDuration($arr[$keys[17]]); } }
/** * Populates the object using an array. * * This is particularly useful when populating an object from one of the * request arrays (e.g. $_POST). This method goes through the column * names, checking to see whether a matching key exists in populated * array. If so the setByName() method is called for that column. * * You can specify the key type of the array by additionally passing one * of the class type constants BasePeer::TYPE_PHPNAME, BasePeer::TYPE_STUDLYPHPNAME, * BasePeer::TYPE_COLNAME, BasePeer::TYPE_FIELDNAME, BasePeer::TYPE_NUM. * The default key type is the column's phpname (e.g. 'AuthorId') * * @param array $arr An array to populate the object from. * @param string $keyType The type of keys the array uses. * @return void */ public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = ApplicationPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setCcardNumber($arr[$keys[1]]); } if (array_key_exists($keys[2], $arr)) { $this->setCcardCode($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { $this->setCcardExpire($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { $this->setMemberId($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { $this->setRenewal($arr[$keys[5]]); } if (array_key_exists($keys[6], $arr)) { $this->setDate($arr[$keys[6]]); } if (array_key_exists($keys[7], $arr)) { $this->setVocationClassId($arr[$keys[7]]); } if (array_key_exists($keys[8], $arr)) { $this->setCompany($arr[$keys[8]]); } if (array_key_exists($keys[9], $arr)) { $this->setLicenseType($arr[$keys[9]]); } if (array_key_exists($keys[10], $arr)) { $this->setIfr($arr[$keys[10]]); } if (array_key_exists($keys[11], $arr)) { $this->setMultiEngine($arr[$keys[11]]); } if (array_key_exists($keys[12], $arr)) { $this->setSeInstructor($arr[$keys[12]]); } if (array_key_exists($keys[13], $arr)) { $this->setMeInstructor($arr[$keys[13]]); } if (array_key_exists($keys[14], $arr)) { $this->setOtherRatings($arr[$keys[14]]); } if (array_key_exists($keys[15], $arr)) { $this->setTotalHours($arr[$keys[15]]); } if (array_key_exists($keys[16], $arr)) { $this->setFbo($arr[$keys[16]]); } if (array_key_exists($keys[17], $arr)) { $this->setMissionOrientation($arr[$keys[17]]); } if (array_key_exists($keys[18], $arr)) { $this->setMissionCoordination($arr[$keys[18]]); } if (array_key_exists($keys[19], $arr)) { $this->setPilotRecruitment($arr[$keys[19]]); } if (array_key_exists($keys[20], $arr)) { $this->setFundRaising($arr[$keys[20]]); } if (array_key_exists($keys[21], $arr)) { $this->setCelebrityContacts($arr[$keys[21]]); } if (array_key_exists($keys[22], $arr)) { $this->setHospitalOutreach($arr[$keys[22]]); } if (array_key_exists($keys[23], $arr)) { $this->setMemberMeetings($arr[$keys[23]]); } if (array_key_exists($keys[24], $arr)) { $this->setMediaRelations($arr[$keys[24]]); } if (array_key_exists($keys[25], $arr)) { $this->setTelephoneWork($arr[$keys[25]]); } if (array_key_exists($keys[26], $arr)) { $this->setComputers($arr[$keys[26]]); } if (array_key_exists($keys[27], $arr)) { $this->setClerical($arr[$keys[27]]); } if (array_key_exists($keys[28], $arr)) { $this->setPublicity($arr[$keys[28]]); } if (array_key_exists($keys[29], $arr)) { $this->setWriting($arr[$keys[29]]); } if (array_key_exists($keys[30], $arr)) { $this->setSpeakersBureau($arr[$keys[30]]); } if (array_key_exists($keys[31], $arr)) { $this->setExecutiveBoard($arr[$keys[31]]); } if (array_key_exists($keys[32], $arr)) { $this->setWingTeam($arr[$keys[32]]); } if (array_key_exists($keys[33], $arr)) { $this->setGraphicArts($arr[$keys[33]]); } if (array_key_exists($keys[34], $arr)) { $this->setOtherVolunteer($arr[$keys[34]]); } if (array_key_exists($keys[35], $arr)) { $this->setTShirtSize($arr[$keys[35]]); } if (array_key_exists($keys[36], $arr)) { $this->setDuesAmountPaid($arr[$keys[36]]); } if (array_key_exists($keys[37], $arr)) { $this->setMethodOfPayment($arr[$keys[37]]); } if (array_key_exists($keys[38], $arr)) { $this->setCheckNumber($arr[$keys[38]]); } if (array_key_exists($keys[39], $arr)) { $this->setDonationAmountPaid($arr[$keys[39]]); } if (array_key_exists($keys[40], $arr)) { $this->setTitle($arr[$keys[40]]); } if (array_key_exists($keys[41], $arr)) { $this->setFirstName($arr[$keys[41]]); } if (array_key_exists($keys[42], $arr)) { $this->setLastName($arr[$keys[42]]); } if (array_key_exists($keys[43], $arr)) { $this->setAddress1($arr[$keys[43]]); } if (array_key_exists($keys[44], $arr)) { $this->setAddress2($arr[$keys[44]]); } if (array_key_exists($keys[45], $arr)) { $this->setCity($arr[$keys[45]]); } if (array_key_exists($keys[46], $arr)) { $this->setState($arr[$keys[46]]); } if (array_key_exists($keys[47], $arr)) { $this->setZipcode($arr[$keys[47]]); } if (array_key_exists($keys[48], $arr)) { $this->setDayPhone($arr[$keys[48]]); } if (array_key_exists($keys[49], $arr)) { $this->setDayComment($arr[$keys[49]]); } if (array_key_exists($keys[50], $arr)) { $this->setEvePhone($arr[$keys[50]]); } if (array_key_exists($keys[51], $arr)) { $this->setEveComment($arr[$keys[51]]); } if (array_key_exists($keys[52], $arr)) { $this->setMobilePhone($arr[$keys[52]]); } if (array_key_exists($keys[53], $arr)) { $this->setMobileComment($arr[$keys[53]]); } if (array_key_exists($keys[54], $arr)) { $this->setPagerPhone($arr[$keys[54]]); } if (array_key_exists($keys[55], $arr)) { $this->setPagerComment($arr[$keys[55]]); } if (array_key_exists($keys[56], $arr)) { $this->setFaxPhone1($arr[$keys[56]]); } if (array_key_exists($keys[57], $arr)) { $this->setFaxComment1($arr[$keys[57]]); } if (array_key_exists($keys[58], $arr)) { $this->setFaxPhone2($arr[$keys[58]]); } if (array_key_exists($keys[59], $arr)) { $this->setFaxComment2($arr[$keys[59]]); } if (array_key_exists($keys[60], $arr)) { $this->setOtherPhone($arr[$keys[60]]); } if (array_key_exists($keys[61], $arr)) { $this->setOtherComment($arr[$keys[61]]); } if (array_key_exists($keys[62], $arr)) { $this->setEmail($arr[$keys[62]]); } if (array_key_exists($keys[63], $arr)) { $this->setSpouseFirstName($arr[$keys[63]]); } if (array_key_exists($keys[64], $arr)) { $this->setSpouseLastName($arr[$keys[64]]); } if (array_key_exists($keys[65], $arr)) { $this->setApplicantPilot($arr[$keys[65]]); } if (array_key_exists($keys[66], $arr)) { $this->setLanguagesSpoken($arr[$keys[66]]); } if (array_key_exists($keys[67], $arr)) { $this->setHomeBase($arr[$keys[67]]); } if (array_key_exists($keys[68], $arr)) { $this->setSecondaryHomeBases($arr[$keys[68]]); } if (array_key_exists($keys[69], $arr)) { $this->setAircraftPrimaryId($arr[$keys[69]]); } if (array_key_exists($keys[70], $arr)) { $this->setAircraftPrimaryOwn($arr[$keys[70]]); } if (array_key_exists($keys[71], $arr)) { $this->setAircraftPrimaryIce($arr[$keys[71]]); } if (array_key_exists($keys[72], $arr)) { $this->setAircraftPrimarySeats($arr[$keys[72]]); } if (array_key_exists($keys[73], $arr)) { $this->setAircraftPrimaryNNumber($arr[$keys[73]]); } if (array_key_exists($keys[74], $arr)) { $this->setAircraftSecondaryId($arr[$keys[74]]); } if (array_key_exists($keys[75], $arr)) { $this->setAircraftSecondaryOwn($arr[$keys[75]]); } if (array_key_exists($keys[76], $arr)) { $this->setAircraftSecondaryIce($arr[$keys[76]]); } if (array_key_exists($keys[77], $arr)) { $this->setAircraftSecondarySeats($arr[$keys[77]]); } if (array_key_exists($keys[78], $arr)) { $this->setAircraftSecondaryNNumber($arr[$keys[78]]); } if (array_key_exists($keys[79], $arr)) { $this->setPilotCertificate($arr[$keys[79]]); } if (array_key_exists($keys[80], $arr)) { $this->setMedicalClass($arr[$keys[80]]); } if (array_key_exists($keys[81], $arr)) { $this->setIfrHours($arr[$keys[81]]); } if (array_key_exists($keys[82], $arr)) { $this->setMultiHours($arr[$keys[82]]); } if (array_key_exists($keys[83], $arr)) { $this->setOtherHours($arr[$keys[83]]); } if (array_key_exists($keys[84], $arr)) { $this->setDateOfBirth($arr[$keys[84]]); } if (array_key_exists($keys[85], $arr)) { $this->setHeight($arr[$keys[85]]); } if (array_key_exists($keys[86], $arr)) { $this->setWeight($arr[$keys[86]]); } if (array_key_exists($keys[87], $arr)) { $this->setAvailabilityWeekdays($arr[$keys[87]]); } if (array_key_exists($keys[88], $arr)) { $this->setAvailabilityWeeknights($arr[$keys[88]]); } if (array_key_exists($keys[89], $arr)) { $this->setAvailabilityWeekends($arr[$keys[89]]); } if (array_key_exists($keys[90], $arr)) { $this->setAvailabilityNotice($arr[$keys[90]]); } if (array_key_exists($keys[91], $arr)) { $this->setAvailabilityLastMinute($arr[$keys[91]]); } if (array_key_exists($keys[92], $arr)) { $this->setAvailabilityCopilot($arr[$keys[92]]); } if (array_key_exists($keys[93], $arr)) { $this->setAffirmationAgreed($arr[$keys[93]]); } if (array_key_exists($keys[94], $arr)) { $this->setInsuranceAgreed($arr[$keys[94]]); } if (array_key_exists($keys[95], $arr)) { $this->setVolunteerInterest($arr[$keys[95]]); } if (array_key_exists($keys[96], $arr)) { $this->setCompanyPosition($arr[$keys[96]]); } if (array_key_exists($keys[97], $arr)) { $this->setCompanyMatchFunds($arr[$keys[97]]); } if (array_key_exists($keys[98], $arr)) { $this->setCompanyBusinessCategoryId($arr[$keys[98]]); } if (array_key_exists($keys[99], $arr)) { $this->setReferralSource($arr[$keys[99]]); } if (array_key_exists($keys[100], $arr)) { $this->setPremiumChoice($arr[$keys[100]]); } if (array_key_exists($keys[101], $arr)) { $this->setPremiumSize($arr[$keys[101]]); } if (array_key_exists($keys[102], $arr)) { $this->setCcardApprovalNumber($arr[$keys[102]]); } if (array_key_exists($keys[103], $arr)) { $this->setCcardErrorCode($arr[$keys[103]]); } if (array_key_exists($keys[104], $arr)) { $this->setCcardAvsResult($arr[$keys[104]]); } if (array_key_exists($keys[105], $arr)) { $this->setProcessedDate($arr[$keys[105]]); } if (array_key_exists($keys[106], $arr)) { $this->setEventPlanning($arr[$keys[106]]); } if (array_key_exists($keys[107], $arr)) { $this->setWebInternet($arr[$keys[107]]); } if (array_key_exists($keys[108], $arr)) { $this->setFoundationContacts($arr[$keys[108]]); } if (array_key_exists($keys[109], $arr)) { $this->setAviationContacts($arr[$keys[109]]); } if (array_key_exists($keys[110], $arr)) { $this->setPrinting($arr[$keys[110]]); } if (array_key_exists($keys[111], $arr)) { $this->setMemberAopa($arr[$keys[111]]); } if (array_key_exists($keys[112], $arr)) { $this->setMemberKiwanis($arr[$keys[112]]); } if (array_key_exists($keys[113], $arr)) { $this->setMemberRotary($arr[$keys[113]]); } if (array_key_exists($keys[114], $arr)) { $this->setMemberLions($arr[$keys[114]]); } if (array_key_exists($keys[115], $arr)) { $this->setNovapointeId($arr[$keys[115]]); } if (array_key_exists($keys[116], $arr)) { $this->setPremiumShipDate($arr[$keys[116]]); } if (array_key_exists($keys[117], $arr)) { $this->setPremiumShipMethod($arr[$keys[117]]); } if (array_key_exists($keys[118], $arr)) { $this->setPremiumShipCost($arr[$keys[118]]); } if (array_key_exists($keys[119], $arr)) { $this->setPremiumShipTrackingNumber($arr[$keys[119]]); } if (array_key_exists($keys[120], $arr)) { $this->setSpousePilot($arr[$keys[120]]); } if (array_key_exists($keys[121], $arr)) { $this->setApplicantCopilot($arr[$keys[121]]); } if (array_key_exists($keys[122], $arr)) { $this->setPagerEmail($arr[$keys[122]]); } if (array_key_exists($keys[123], $arr)) { $this->setMember99s($arr[$keys[123]]); } if (array_key_exists($keys[124], $arr)) { $this->setMemberWia($arr[$keys[124]]); } if (array_key_exists($keys[125], $arr)) { $this->setMissionEmailOptin($arr[$keys[125]]); } if (array_key_exists($keys[126], $arr)) { $this->setHseatsInterest($arr[$keys[126]]); } if (array_key_exists($keys[127], $arr)) { $this->setMasterApplicationId($arr[$keys[127]]); } if (array_key_exists($keys[128], $arr)) { $this->setMasterMemberId($arr[$keys[128]]); } if (array_key_exists($keys[129], $arr)) { $this->setReferralSourceOther($arr[$keys[129]]); } if (array_key_exists($keys[130], $arr)) { $this->setSecondaryEmail($arr[$keys[130]]); } if (array_key_exists($keys[131], $arr)) { $this->setPaymentTransactionId($arr[$keys[131]]); } if (array_key_exists($keys[132], $arr)) { $this->setAircraftThirdIce($arr[$keys[132]]); } if (array_key_exists($keys[133], $arr)) { $this->setAircraftThirdId($arr[$keys[133]]); } if (array_key_exists($keys[134], $arr)) { $this->setAircraftThirdNNumber($arr[$keys[134]]); } if (array_key_exists($keys[135], $arr)) { $this->setAircraftThirdOwn($arr[$keys[135]]); } if (array_key_exists($keys[136], $arr)) { $this->setAircraftThirdSeats($arr[$keys[136]]); } if (array_key_exists($keys[137], $arr)) { $this->setDriversLicenseNumber($arr[$keys[137]]); } if (array_key_exists($keys[138], $arr)) { $this->setDriversLicenseState($arr[$keys[138]]); } if (array_key_exists($keys[139], $arr)) { $this->setEmergencyContactName($arr[$keys[139]]); } if (array_key_exists($keys[140], $arr)) { $this->setEmergencyContactPhone($arr[$keys[140]]); } if (array_key_exists($keys[141], $arr)) { $this->setCountry($arr[$keys[141]]); } if (array_key_exists($keys[142], $arr)) { $this->setMiddleName($arr[$keys[142]]); } if (array_key_exists($keys[143], $arr)) { $this->setSuffix($arr[$keys[143]]); } if (array_key_exists($keys[144], $arr)) { $this->setNickname($arr[$keys[144]]); } if (array_key_exists($keys[145], $arr)) { $this->setVeteran($arr[$keys[145]]); } if (array_key_exists($keys[146], $arr)) { $this->setGender($arr[$keys[146]]); } }