You are here

function _background_process_callback_name in Background Process 7.2

Same name and namespace in other branches
  1. 8 background_process.module \_background_process_callback_name()
  2. 6 background_process.module \_background_process_callback_name()
  3. 7 background_process.module \_background_process_callback_name()

Get string name of callback.

Parameters

$callback: Callback can be either a string or an array.

Return value

string The name of the callback, e.g. 'myfunction', 'myclass::mystaticmethod' or 'myclass->mymethod'.

1 call to _background_process_callback_name()
BackgroundProcess::execute in ./background_process.inc
Execute the background process callback function.

File

./background_process.module, line 637

Code

function _background_process_callback_name($callback) {
  if (is_array($callback)) {
    if (is_object($callback[0])) {
      $callback = get_class($callback[0]) . '->' . $callback[1];
    }
    else {
      $callback = $callback[0] . '::' . $callback[1];
    }
  }
  return $callback;
}