-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSession.php
56 lines (50 loc) · 1.47 KB
/
Session.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
<?php
Class Session{
private $OccupiedSlots;
private $ConsultedSlots;
private $AvailableSlots;
//private $ses=null;
private $docID;
private $mediCenID;
private $numOfSlots;
private $date;
private $start;
private $end;
function __construct($numOfSlots,$docID, $mediCenID,$date,$start,$end)
{
$this->$docID = $docID;
$this->$mediCenID =$mediCenID;
$this->$numOfSlots=$numOfSlots;
$this->$date=$date;
$this->$start=$start;
$this->$end=$end;
$AvailableSlots = array();
$ConsultedSlots= array();
$OccupiedSlots= array();
// for ($i=0;$i<$numOfSlots;$i++){
// array_push($AvailableSlots,"0");
// }
// print_r($AvailableSlots);
}
function __updateSlots($slotList){
// include "Slot.php";
for($s=0;$s<$this->numOfSlots;$s++){
if($slotList[$s]->getState()=="0"){
array_push($AvailableSlots,$slotList[$s]);
}
else if($slotList[$s]->getState()=="1"){
array_push($OccupiedSlots,$slotList[$s]);
}
else if($slotList[$s]->getState()=="2"){
array_push($ConsultedSlots,$slotList[$s]);
}
}
}
// function displaySlots(){
// for($i=0;$i<$numOfSlots;$i++){
// if()
// }
// }
}
// $s=new Session(5);
?>