forked from AppStateESS/InternshipInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFacultySupervisor.php
71 lines (58 loc) · 1.48 KB
/
FacultySupervisor.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php
namespace Intern;
/**
* FacultySupervisor
*
* Represents a faculty supervisor for an academic department.
*
* @deprecated
* @see Faculty
* @author Robert Bost <bostrt at tux dot appstate dot edu>
* @author Jeremy Booker <jbooker at tux dot appstate dot edu>
* @package Intern
*/
class FacultySupervisor extends Model
{
public $first_name;
public $last_name;
public $phone;
public $email;
public $department_id;
// For db page, doesn't actually exist in db
public $faculty_last_name;
/**
* @Override Model::getDb
*/
public function getDb()
{
return new PHPWS_DB('intern_faculty_supervisor');
}
/**
* @Override Model::getCSV
*/
public function getCSV()
{
$csv = array();
$csv['Faculty Super. First Name'] = $this->first_name;
$csv['Faculty Super. Last Name'] = $this->last_name;
$csv['Faculty Super. Phone'] = $this->phone;
$csv['Faculty Super. Email'] = $this->email;
return $csv;
}
public function getFullName()
{
// If there's no first name and no last name, be sure to return a compltely empty string
if(empty($this->first_name) && empty($this->last_name)){
return '';
}
return "$this->first_name $this->last_name";
}
public function getPhone()
{
return $this->phone;
}
public function getEmail()
{
return $this->email;
}
}