Finaly
- aiki must load extension by demand. Prior load a extension, aiki check
config("extensions-allowed") to load or not the extension.
config("extensions-allowed") can be:
a) "ALL": all extension will be loaded (default value)
b) "NONE": extension will NOT be loaded
c) a list of allowed extension separated by coma. For example:
"web2date,other,foo".
** Changed in: aikiframework
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Aiki
Framework Developers, which is subscribed to aikiframework.
https://bugs.launchpad.net/bugs/792681
Title:
aiki only loads extensions on-demand and no simple way to load them
upon system load
Status in Aiki Framework:
Fix Released
Bug description:
Well there are ways to do, but need to be able to set in the
config.php file a setting for extensions to load.
One thing we can do is only load extensions that inherit from a new
Extensions superclass.
The idea here is that there are some operations that would need to be
tested for aikiframework core, and they might need to be run on every
instance of aiki. Also, this gives a nice migration plan if an
extension becomes useful enough to move into the core...which we are
trying to keep lean.
My thought is to add:
$config['extensions-preload'] = array('myExtensionClassName',
'AnotherCrazyExtension');
Then in aiki.php we add after all the default extensions, this:
foreach ( $config['extensions-preload'] as $ext ) {
$aiki->load($ext);
}
###
Other things we could do, is add a priority to extensions, so that the
loading can happen in a weighted way, rather than file order. Or, we
could add an option to have pre-extensions and post-extensions for
when to load those extensions orrrr, we could add an event/hook system
and fire an event like 'pre_extension_load' and allow for code to hook
in and load extensions pre, and then do the same like
'post_extension_load' and let developers load in whatever extensions
they want.
Simpler is better though IMO.
To manage notifications about this bug go to:
https://bugs.launchpad.net/aikiframework/+bug/792681/+subscriptions
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework-devel
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework-devel
More help : https://help.launchpad.net/ListHelp