I have a plugin management tool, but I used it only with plugins with plugins, and with all enabled plugins it usually loads immediately. But for an event-based and lazy-loading API, I could imagine using small wrappers to manage plugins and resorting to automatic loading for actual extensions.
<?php $plugins["title_event"] = "TitleEventClass"; $plugins["secondary"] = array("Class2", "callback"); ?>
In this example, I would suggest that the plugin API is a simple list. In this example, feature-plugin-123.php script will do nothing but add to the array at boot time. Thus, even if you have a dozen function plugins, this will only result in an additional include_once everyone.
But the main application / or plugin API can instead simply create instances of the specified classes (either new $eventcb; for the original class names, or call_user_func_array for callbacks). In turn, this will lead to loading the actual task to the autoloader. So you have a dual system where one part manages the list and the other part real code.
I thus still imagine a simple config.php that simply lists plugins and settings like this:
<?php include_once("user/feature-plugin-123.php"); include_once("user/otherplugin2.php"); include_once("user/wrapper-for-htmlpurifier.php"); $cfg["pretty"] = 1;
Again, considering that these are just shells / data scripts, with a description of the plugin for manageability. You can also use the actual register_even() API and define an additional wrapper function in each. But a list of class names seems to be the easiest option.
The above management tool looks rusty and ugly: http://milki.include-once.org/genericplugins/
But it is not used if you just need a list (sql table) and configuration management. This overhead is only for beautifully printing plugin metadata and saving readable text to config.php .
Finally:
spl_autoload() on include_path and a simple register event-> classname, one shell script each, it just turns on all at once.