FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » about a piece of code from drupal 3.0.x
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
about a piece of code from drupal 3.0.x [message #175954] Thu, 10 November 2011 10:29
zhang yun is currently offline  zhang yun
Messages: 3
Registered: July 2011
Karma: 0
Junior Member
hi all
i don't understand this function .if someone help me explain it ,i
would appreciate
the code:

// invoke hook $hook of module $name with optional arguments:
function module_invoke($name, $hook, $a1 = NULL, $a2 = NULL) {
$function = $name ."_". $hook;
if (function_exists($function)) {
return $function($a1, $a2);
}
}

what is it would return ? why write $function( $a1 , $a2);?
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: execution just stops when it gets to DB::connect
Next Topic: about a piece of code from drupal 3.0.x
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 07:11:42 GMT 2024

Total time taken to generate the page: 0.04759 seconds