[development] Giving form_alter an $op and calling it more than once.

Adrian Rossouw adrian at bryght.com
Tue Apr 18 16:28:10 UTC 2006


On 18 Apr 2006, at 5:42 PM, Chris Johnson wrote:

>
> What if, instead of "call module hook if it exists" calls, we built  
> an ordered list of callbacks for each hook at module enable time,  
> and did our hook calls by walking that list (graph)?  Enabling a  
> module would add its hooks to lists stored in a compact, high- 
> performance format in a cache / db table.  Callbacks would walk  
> those lists.  Necessary enable logic would allow module to place  
> itself in a list more than once if needed for re-invoking /  
> roundtrip scenarios.
Which is why i mentioned hook_callback, and hooks as automatic  
callbacks.

The only problem with caching callbacks, is the callback arguments.
They are set when you cache the callbacks, and not when you call the  
callbacks.

--
Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com




More information about the development mailing list