2 Mar
2005
2 Mar
'05
12:14 p.m.
This has been bugging in my sleep of late because I keep having to go into the core modules to change things. But why doesn't module_invoke_ all or Drupal use data caching? This would allow modules to override functions by writing to the cache. When checking for the hook there could be an extra maintenance string added. this is just notes code not real or perfect. <?php function module_invoke($module, $hook, $a1 = NULL, $a2 = NULL, $a3 = NULL, $a4 = NULL) { $function = $module .'_'. $hook; if (function_exists(${$function.'_extended'})) { return addToCache($function_extended($a1, $a2, $a3, $a4)); } else { return addToCache($function($a1, $a2, $a3, $a4)); } } ?> Carl McDade