/** * Creates a JobApplication object from a resultset row * * @param array $row Resultset row from the database. * @return JobApplication JobApplication object. */ private static function _createFromRow($row) { $application = new JobApplication($row[self::DB_FIELD_ID]); $application->setVacancyId($row[self::DB_FIELD_VACANCY_ID]); $application->setFirstName($row[self::DB_FIELD_FIRSTNAME]); $application->setMiddleName($row[self::DB_FIELD_MIDDLENAME]); $application->setLastName($row[self::DB_FIELD_LASTNAME]); $application->setStreet1($row[self::DB_FIELD_STREET1]); $application->setStreet2($row[self::DB_FIELD_STREET2]); $application->setCity($row[self::DB_FIELD_CITY]); $application->setCountry($row[self::DB_FIELD_COUNTRY_CODE]); $application->setProvince($row[self::DB_FIELD_PROVINCE]); $application->setZip($row[self::DB_FIELD_ZIP]); $application->setPhone($row[self::DB_FIELD_PHONE]); $application->setMobile($row[self::DB_FIELD_MOBILE]); $application->setEmail($row[self::DB_FIELD_EMAIL]); $application->setQualifications($row[self::DB_FIELD_QUALIFICATIONS]); $application->setStatus($row[self::DB_FIELD_STATUS]); $application->setAppliedDateTime($row[self::DB_FIELD_APPLIED_DATETIME]); $application->setEmpNumber($row[self::DB_FIELD_EMP_NUMBER]); $application->setResumeName($row[self::DB_FIELD_RESUME_NAME]); if (isset($row[self::JOB_TITLE_NAME])) { $application->setJobTitleName($row[self::JOB_TITLE_NAME]); } if (isset($row[self::HIRING_MANAGER_NAME])) { $application->setHiringManagerName($row[self::HIRING_MANAGER_NAME]); } return $application; }