You are here

function _messaging_callback in Messaging 6.2

Same name and namespace in other branches
  1. 6.4 messaging.module \_messaging_callback()
  2. 6 messaging.module \_messaging_callback()
  3. 6.3 messaging.module \_messaging_callback()

Build callback structure to be invoked later

A callback structure will be an array containing the function name to invoke and a list of arguments for that function

Parameters

$function: Function name

$arg1, $arg1, $arg3:

2 calls to _messaging_callback()
Messaging_API_Tests::testMessagingBasicAPI in tests/messaging_api.test
Exercise basic API functions
messaging_debug_messaging_methods_alter in messaging_debug/messaging_debug.module
Implementation of hook_messaging_methods_alter()

File

./messaging.module, line 1059

Code

function _messaging_callback() {
  $args = func_get_args();
  if (count($args) > 1) {

    // Array with function name, param1, param2..
    return $args;
  }
  else {

    // Simple string with function name
    return array_shift($args);
  }
}