We add two events to allow plugins to initialize and cleanup.
+InitializePlugin: a chance to initialize a plugin in a complete
+ environment
+
+CleanupPlugin: a chance to cleanup a plugin at the end of a program
+
StartPrimaryNav: Showing the primary nav menu
- $action: the current action
$sac->showPage();
}
}
+
+// XXX: cleanup exit() calls or add an exit handler so
+// this always gets called
+
+Event::handle('CleanupPlugin');
require_once(INSTALLDIR.'/lib/' . strtolower($class) . '.php');
}
}
+
+// Give plugins a chance to initialize in a fully-prepared environment
+
+Event::handle('InitializePlugin');