7 public function add($item)
9 foreach ($this->disciplinas
as $dis)
10 $item->check_values($dis, true);
12 $this->disciplinas
[] = $item;
15 private function print_dia_cel($h)
17 foreach ($this->dias
as $dia) {
19 foreach ($this->disciplinas
as $item)
20 if ($item->has_horario($dia, $h))
21 $show = $item->get_nome();
22 echo("<td> " . $show . "</td>\n");
26 private function print_horario($h)
28 echo("<td>" . $this->horario
[$h - 1] . "</td>\n");
31 private function print_table_header()
33 echo("<h1>Quadro de horario</h1>");
37 echo("<td>hora</td>\n");
38 foreach ($this->dias
as $dia)
39 echo("<td>" . $dia . "</td>\n");
44 public function show()
46 echo("<table border='1'>\n");
48 $this->print_table_header();
50 for ($i = 1; $i <= $this->disciplinas
[0]->get_rows(); $i++
) {
52 $this->print_horario($i);
53 $this->print_dia_cel($i);
60 public function __construct()
62 $this->horario
= array("7:30 - 8:20", "8:20 - 9:10", "9:30 - 10:20",
63 "10:20 - 11:10", "11:10 - 12:00", "12:00 - 12:50");
64 $this->dias
= array("seg", "ter", "qua", "qui", "sex");
65 $this->disciplinas
= array();