Just a generic thought for the future, I'm reading the docco on module development, and while the hooks are fine I guess would a better solution be for all modules to extend a base "Module" class (abstract) that defines the interfacel.

Then perhaps you could variable variables to dynamically name classes to call methods, something like

instantiatedModuleName->getHead();
instantiatedModuleName->save(...);
instantiatedModuleName->getHelp();

Using variable variables you may be able to use the equivalent of module_invoke_all, plus you keep that modules functions within the scope of it's object, which is always nice.

Read more on varaible variables here:
http://www.php.net/manual/en/language.variables.variable.php

Comments

neko’s picture

my currently opinon is that a CMF like drupal would benefit from a more OO design - encapsulate as much as possible, have clean interfaces between nodes, modules and themes.

Drupal 5? Only local images are allowed.