You are here

public static function BackgroundProcess::currentProcess in Background Process 7.2

Get/set the current global process

Parameters

BackgroundProcess $process (optional): BackgroundProcess to set

Return value

BackgroundProcess Current BackgroundProcess object

6 calls to BackgroundProcess::currentProcess()
BackgroundProcess::execute in ./background_process.inc
Execute the background process callback function.
background_process_current_handle in ./background_process.module
Get/set current handle.
background_process_keepalive in ./background_process.module
Keep the current background process alive (meaning restart it when it exits)
background_process_restart in ./background_process.module
Restart the current background process
background_process_watchdog in ./background_process.module
Implements hook_watchdog().

... See full list

File

./background_process.inc, line 92
External API short overview

Class

BackgroundProcess
@file

Code

public static function currentProcess(BackgroundProcess $process = NULL) {
  if ($process) {
    $old_process = self::$current_process;
    self::$current_process = $process;
    return $old_process;
  }
  return self::$current_process;
}