- /**
- * Load related modules when needed
- *
- * @param string $cls Name of the class to be loaded
- *
- * @return boolean hook value; true means continue processing, false means stop.
- */
- function onAutoload($cls)
- {
- $dir = dirname(__FILE__);
-
- switch ($cls)
- {
- case 'NeweventAction':
- case 'NewrsvpAction':
- case 'CancelrsvpAction':
- case 'ShoweventAction':
- case 'ShowrsvpAction':
- include_once $dir . '/' . strtolower(mb_substr($cls, 0, -6)) . '.php';
- return false;
- case 'EventListItem':
- case 'RSVPListItem':
- case 'EventForm':
- case 'RSVPForm':
- case 'CancelRSVPForm':
- include_once $dir . '/'.strtolower($cls).'.php';
- break;
- case 'Happening':
- case 'RSVP':
- include_once $dir . '/'.$cls.'.php';
- return false;
- default:
- return true;
- }
- }
-