public function Messaging_Send_Method::callback_invoke in Messaging 6.3
Invoke callback with a variable number of arguments
2 calls to Messaging_Send_Method::callback_invoke()
- Messaging_Send_Method::send in classes/
messaging_method.class.inc - Send message to destination by calling the method's send callback
- Messaging_Send_Method::user_destination in classes/
messaging_method.class.inc - Get destination for user
File
- classes/
messaging_method.class.inc, line 297 - Drupal Messaging Framework - Send_Method class file
Class
- Messaging_Send_Method
- Sending method, implements all specific method functionality
Code
public function callback_invoke() {
$args = func_get_args();
$callback = array_shift($args);
if (is_array($callback)) {
// It is an array: function, arg1, arg2...
$function = array_shift($callback);
$params = $callback;
}
else {
// It is just a function name
$function = $callback;
$params = array();
}
// Merge parameters and go for it
$params = array_merge($params, $args);
return call_user_func_array($function, $params);
}