[development] module_exists vs. functions_exists?

Michael Favia michael at favias.org
Mon Jun 23 17:56:40 UTC 2008


Daniel F. Kudwien wrote:
> Also, module_invoke() is not limited to Drupal hooks / API callbacks. If the returned results of call_user_func_array() work for your particular implementation, this is the best approach for each module that wants to integrate with another, optionally installed module in contrib.
Assuming you dont want to do something else if the module/function 
doesn't exist of course. Which in my usage is normally the case. I 
suppose checking the boolean return value from call_user_func_array() 
would probably suffice for most cases unless FALSE is a valid return 
from the function that didn't exist in the first place. Tricky, tricky. 
Who's on first?
-- 
Michael Favia                   michael at favias.org
tel. 512.585.5650            http://www.favias.org


More information about the development mailing list