My SFEP serie continues with some configuration stuff: 1. to help with plugin dependance checking, and interaction between them, I propose to add the following methods to sfProjectConfiguration:
/** * Returns true if a given plugin exists and is enabled. */ public function hasPlugin($pluginName); /** * Gets the full path of a given plugin. */ public function getPluginPath($pluginName); 2. Another enhancement that is more subject to reflexion would be to implement th ArrayAccess interface for plugins in sfProjectConfiguration. This would make the following stuff available (assume $configuration is a sfProjectConfiguration instance): /* check if a plugin is enabled */ isset($configuration['sfSuperPlugin']); /* direct access to plugin configuration instances */ $configuration['sfSuperPlugin']->getSomeStuff(); The major problem that can come from this is that we lock the ArrayAccess interface for something that could be of great use later, to do something that can already be done with more code (assuming we add the ->hasPlugin() method)). What do you think? Romain --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-devs?hl=en -~----------~----~----~----~------~----~------~--~---
