You are here

function background_process_prepare_dispatcher_callback in Background Process 7.2

3 calls to background_process_prepare_dispatcher_callback()
background_process_get_service_host_options in ./background_process.module
background_process_get_service_host_title in ./background_process.module
background_process_invoke_dispatcher in ./background_process.module

File

./background_process.module, line 191

Code

function background_process_prepare_dispatcher_callback($dispatcher, $type = NULL) {
  $dispatchers = background_process_get_dispatchers();
  if (empty($dispatchers[$dispatcher])) {
    throw new Exception(t('Dispatcher: %dispatcher not found', array(
      '%dispatcher' => $dispatcher,
    )));
  }
  if (isset($dispatchers[$dispatcher])) {
    include_once $dispatchers[$dispatcher]['file'];
  }
  $key = ($type ? $type . ' ' : '') . 'callback';
  return isset($dispatchers[$dispatcher][$key]) ? $dispatchers[$dispatcher][$key] : NULL;
}