| @@ 6-20 (lines=15) @@ | ||
| 3 | { |
|
| 4 | protected $dbData; |
|
| 5 | ||
| 6 | public function __construct($departmentID, $dbData = null) |
|
| 7 | { |
|
| 8 | if($dbData === null) |
|
| 9 | { |
|
| 10 | $dataTable = DataSetFactory::getDataTableByNames('fvs', 'departments'); |
|
| 11 | $filter = new \Data\Filter('departmentID eq '.$departmentID); |
|
| 12 | $depts = $dataTable->read($filter); |
|
| 13 | if(empty($depts)) |
|
| 14 | { |
|
| 15 | throw new Exception('Unable to locate department with ID '.$departmentID); |
|
| 16 | } |
|
| 17 | $dbData = $depts[0]; |
|
| 18 | } |
|
| 19 | $this->dbData = $dbData; |
|
| 20 | } |
|
| 21 | ||
| 22 | public function getLeadEmails() |
|
| 23 | { |
|
| @@ 8-22 (lines=15) @@ | ||
| 5 | protected $myStart = null; |
|
| 6 | protected $myEnd = null; |
|
| 7 | ||
| 8 | public function __construct($shiftID, $dbData = null) |
|
| 9 | { |
|
| 10 | if($dbData === null) |
|
| 11 | { |
|
| 12 | $dataTable = DataSetFactory::getDataTableByNames('fvs', 'shifts'); |
|
| 13 | $filter = new \Data\Filter('_id eq '.$shiftID); |
|
| 14 | $depts = $dataTable->read($filter); |
|
| 15 | if(empty($depts)) |
|
| 16 | { |
|
| 17 | throw new Exception('Unable to locate shift with ID '.$shiftID); |
|
| 18 | } |
|
| 19 | $dbData = $depts[0]; |
|
| 20 | } |
|
| 21 | $this->dbData = $dbData; |
|
| 22 | } |
|
| 23 | ||
| 24 | public function __get($propName) |
|
| 25 | { |
|