Booking - norbertsackey/ash-sweb-2016-group14 GitHub Wiki

This page documents the Booking class

###Booking Class

The class can be imported into any php code by providing the path to access the booking.php file within the src subfolder, eg:

include_once('src_folder_path/booking.php');

once imported, a new booking object can be instantiated using the default constructor, eg: $obj = Booking();

This newly created booking object, $obj , can then be used to add new bookings by calling the addBooking() function of the Booking class as such: $obj->addBooking(($Equip_ID,$lab_ID, $stud_ID);

where

  • $Equip_ID is the unique ID of an equipment
  • $lab_ID is the unique ID of lab where equipment is stored
  • $stud_ID is the unique ID of the student who booked equipment

An object of the Booking class can also be used to unreserve/release an equipment that has already being booked by calling the unbookEquipment function, eg: $obj->unbookEquipment($Equip_ID, $Booking_ID)

where

  • $Equip_ID is the unique ID of an equipment
  • $Booking_ID is the unique ID of a previous booking