/** * Copies student data from Student object to this Internship. * @param Student $student */ private function initalizeStudentData(Student $student) { // Basic student demographics $this->banner = $student->getStudentId(); $this->email = $student->getUsername(); $this->first_name = $student->getFirstName(); $this->middle_name = $student->getMiddleName(); $this->last_name = $student->getLastName(); $this->birth_date = $student->getBirthDate(); $this->setFirstNameMetaphone($student->getFirstName()); $this->setMiddleNameMetaphone($student->getMiddleName()); $this->setLastNameMetaphone($student->getLastName()); // Academic info $this->level = $student->getLevel(); $this->campus = $student->getCampus(); $this->gpa = $student->getGpa(); // Majors - If double major, just take index 0 $majors = $student->getMajors(); if (is_array($majors)) { $this->major_code = $majors[0]->getCode(); $this->major_description = $majors[0]->getDescription(); } else { if (is_object($majors)) { $this->major_code = $majors->getCode(); $this->major_description = $majors->getDescription(); } } // Else, there were no majors set in the Student object // Contact Info $this->phone = $student->getPhone(); // Student address $this->student_address = $student->getAddress(); $this->student_address2 = $student->getAddress2(); $this->student_city = $student->getCity(); $this->student_state = $student->getState(); $this->student_zip = $student->getZip(); }