You are here

function _ultimate_cron_plugin_load in Ultimate Cron 7.2

Load callback for plugins.

Parameters

string $type: Type of the plugin (settings, scheduler, launcher, logger).

string $name: Name of the plugin (general, queue, serial, database, etc.).

Return value

object The instance of the plugin (singleton).

4 calls to _ultimate_cron_plugin_load()
UltimateCronBackgroundProcessLegacyLauncher::poormanLauncher in plugins/ultimate_cron/launcher/background_process_legacy.class.php
Poorman launcher background process callback.
UltimateCronSerialLauncher::launchPoorman in plugins/ultimate_cron/launcher/serial.class.php
Poormans cron launcher.
ultimate_cron_exit in ./ultimate_cron.poorman.inc
Implements hook_exit().
_ultimate_cron_plugin_require in ./ultimate_cron.module
Require callback for plugins.

File

./ultimate_cron.module, line 275

Code

function _ultimate_cron_plugin_load($type, $name) {
  $cache =& drupal_static('ultimate_cron_plugin_load_all', array());
  if (!isset($cache[$type][$name])) {

    // Will populate the $cache static variable if a plugin is loaded.
    _ultimate_cron_plugin_load_all($type);
  }
  if (isset($cache[$type][$name])) {
    return $cache[$type][$name];
  }
  else {
    return NULL;
  }
}