* group_id [INTEGER] ID of the group * person_id [INTEGER] ID of the person */ $GroupAssociation = new RowManager_GroupAssociationManager(); $GroupAssociation->dropTable(); $GroupAssociation->createTable(); /* * ScheduleBlocks Table * * Object that stores information related to a person's schedule * * scheduleBlocks_id [INTEGER] primary key * schedule_id [INTEGER] foreign key to the meta-data associated with the schedule * scheduleBlocks_timeblock [INTEGER] time blocks of a person's schedule */ $ScheduleBlocks = new RowManager_ScheduleBlocksManager(); $ScheduleBlocks->dropTable(); $ScheduleBlocks->createTable(); /* * GroupType Table * * Contains the types of groups * * groupType_id [INTEGER] ID of the group type * groupType_desc [STRING] The description of the group type */ $GroupType = new RowManager_GroupTypeManager(); $GroupType->dropTable(); $GroupType->createTable(); /* * Schedule Table
function getScheduleData() { //The array to be send $timeBlocksArray = array(); if ($this->scheduleID < 1) { print "No Schedule found for your ID"; $timeBlocksArray = null; } else { //Returns a row of the database with the scheduleID $scheduleBlocksManager = new RowManager_ScheduleBlocksManager(); $scheduleBlocksManager->setScheduleID($this->scheduleID); //Go through the row returned $scheduleBlocksList = new ListIterator($scheduleBlocksManager); $scheduleBlocksList->setFirst(); $timeBlock = -1; while ($scheduleBlocksList->moveNext()) { //get the time block in that row $blocksManager = $scheduleBlocksList->getCurrent(new RowManager_ScheduleBlocksManager()); $timeBlock = $blocksManager->getTimeBlock(); //save the timeblock to the array and keep looping to get all of them $timeBlocksArray[] = $timeBlock; } } //Pass the data to the template for display return $this->template->set('timeBlocksArray', $timeBlocksArray); }