[development] module_exists vs. functions_exists?

Michael Prasuhn mike at mikeyp.net
Tue Jun 24 17:50:54 UTC 2008


On Jun 24, 2008, at 10:48 AM, Earnie Boyd wrote:

> Quoting Frando <frando2 at unbiskant.org>:
>
>>
>> In Drupal 7, module_invoke uses module_hook uses  
>> drupal_function_exists. I
>> don't see why you should not use module_invoke to call API functions.
>>
>
> As I have already stated it isn't the defined use of the function.   
> The defined use of the function is to execute hook implementations.   
> If it is used for anything else then confusion will happen and  
> perhaps cause for a lot of frustration in maintenance.


I don't buy it. This looks like an excellent use of an existing  
function that does exactly what is called for. What defines a 'hook'  
anyway? Is a function not a hook if only one module implements it?  
Would it be such a stretch to think of every function as a hook to be  
invoked in multiple different ways?

-Mike

__________________
Michael Prasuhn
mike at mikeyp.net
http://mikeyp.net
503.488.5433
714.356.0168 cell
949.200.7670 fax





More information about the development mailing list