Hi, its me again. 🙂
Im about to make a simple calendar, and I just want some critique on the design.
It is very simple, should be considered as a calendar for a group of people, only with simple events (start-end date based).
The database design isn't really of interest yet, only that it contains one single table, called calendarEvents.
Im not yet too good at making this kind of code, but trying 😉
class calendar:
void public __construct( int $year, int $month )
void public __destruct( )
string static getMonthNameShort( int $Month = currentMonth )
string static getMonthNameFull( int $Month = currentMonth )
int[] static getEventIDsByYear( int $Year = currentYear )
int[] static getEventIDsByMonth( int $Month = currentMonth )
int[] static getEventIDsByDay( int $day )
int public getYear( )
int public getMonth( )
int[] public getEventDays( )
// only for current month
obj public getEvent( int $id )
// calendarEvent obj
string public show( [ array $options ] )
//$options = array(
// 'tbl_width' => '100%',
// 'dayFormat' => '%a',
// 'startOfWeek' => '1',
// 'previous_next' => array('«', '»')
// );
obj public addEvent( int $day )
// only for current month
// calendarEvent obj
bool public purgeCalendar( )
bool public error( )
bool private checkDate( int $year, int $month, int $day )
bool private checkTimeStamp( int $timestamp )