Public bug reported:
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.
** Affects: aikiframework
Importance: High
Assignee: rejon (rejon)
Status: Confirmed
--
You received this bug notification because you are a member of Aiki
Framework Admins, 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:
Confirmed
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.
_______________________________________________
Mailing list: https://launchpad.net/~aikiframework.admins
Post to : [email protected]
Unsubscribe : https://launchpad.net/~aikiframework.admins
More help : https://help.launchpad.net/ListHelp