Timeslot validation based on rules passed to us (presumably from an SQL entry)
Located in /inc/bookings/timeslotrule.php (line 44)
returns the slot that starts >= the date specified.
return the corresponding the slot specified by the given start date.
ASSUMES that the specified date is a valid start, else behaviour is undefined.
return the
as per findSlotByStart
return the corresponding startdate/time to a time that is possibly within a slot
return true if the specified dates & times are valid as above, but only occupy one slot
return true if the specified dates & times are valid start/stop times to this object's slot rules.
return true if the specified date & time correspond to a valid starting time according to this object's slot rules.
return true if the specified date & time correspond to a valid stopping time according to this object's slot rules.
return the corresponding slot number of the starting or stopping date-time $date returns -1 if no matching slot found.
$match is TSSTART, TSSTOP, TSWITHIN, TSNEXT depending on what matching is queried. $return is TSSTART or TSSTOP depending on the required return value
this function will return a slot from the previous day if the slot spans days and that is the appropriate slot.
WARNING: There be dragons....
timeslot picture syntax (concatinate onto one line, no spaces)
[x] or [x-y] specify the day of week (or range of days). 0=Sunday, 6=Saturday <slot;slot;slot> around the comma-separated slot specifications for that day. All times from 00:00 to 24:00 must be included in the list starttime-stoptime/num_slots-discount%,comment HH:MM time slots with the length of each slot. e.g. 09:00-17:00/1 specifies a slot starting at 9am and finishing 5pm. both 00:00 and 24:00 are valid, also 32:00 for 8am the next day (o'night) num_slots is integer, or wildcard of * for freely adjustable time e.g. 09:00-12:00/3 specifies 3 slots 9-10, 10-11 and 11-12. discount (optional) is the percentage discount applied to bookings in that slot comment (optional) is displayed in vacant or unavailable slots
EXAMPLES:
[0-6]<00:00-08:00/*;08:00-13:00/1;13:00-18:00/1;18:00-24:00/*> Available all days, free booking until 8am and after 6pm, other slots as defined [0]<00:00-24:00/0,Unavailable>[1-5]<09:00-17:00/01:00>[6]<00:00-24:00/0,Unavailable> Not available Sunday and Saturday. Only available weekdays 9am till 5pm with 1hr booking granularity. Calendar views of Sat & Sun will see message "Unavailable" [0]<>[1-5]<00:00-09:00/*;09:00-17:00/8;17:00-24:00/*-50%>[6]<> Not available Sunday and Saturday. Available weekdays 9am till 5pm with 1hr booking granularity, before 9am and after 5pm with no granularity and at a 50% discount. [0]<>[1-5]<09:00-13:00/4;13:00-17:00/2;17:00-33:00/1>[6]<> Not available Sunday and Saturday. Available weekdays 9am till 5pm with 1hr booking granularity, before 9am and after 5pm with no granularity
perform the above operations with no code duplication
Documentation generated on Tue, 06 Mar 2007 10:02:04 +0000 by phpDocumentor 1.3.0