forked from AppStateESS/InternshipInventory
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDepartment.php
53 lines (44 loc) · 1019 Bytes
/
Department.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
<?php
namespace Intern;
/**
* Represents an academic department.
*
* @author Robert Bost <bostrt at tux dot appstate dot edu>
* @author Jeremy Booker <jbooker at tux dot appstate dot edu>
* @package Intern
*/
class Department extends Model
{
public $name;
public $hidden;
public $corequisite; // Whether or not a corequisite course is required for interns in this department.
/**
* @Override Model::getDb
*/
public static function getDb(){
return new \PHPWS_DB('intern_department');
}
/**
* @Override Model::getCSV
*/
public function getCSV()
{
return array('Department' => $this->name);
}
public function getId(){
return $this->id;
}
public function getName(){
return $this->name;
}
public function isHidden(){
return $this->hidden == 1;
}
public function hasCorequisite()
{
if ($this->corequisite == 1) {
return true;
}
return false;
}
}