Skip to content

Instantly share code, notes, and snippets.

@DavidAntaramian
Created December 13, 2010 05:34
Show Gist options
  • Save DavidAntaramian/738690 to your computer and use it in GitHub Desktop.
Save DavidAntaramian/738690 to your computer and use it in GitHub Desktop.
<?php
$event = 0;
try {
// attempts to get an event object from the Event library
// using the original command as defined in the WaiCommand
$event = Event::get_event($command->get_original(), $_SESSION['instance_id']);
// actually handles the event and returns the text to be rendered
return $event->handle();
} catch (Exception $e) {
// This means that there was no such event
// continue processing as if normal
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment