Moodle APIs 3.9
Moodle 3.9.13+ (Build: 20220325)
Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
core_shutdown_manager Class Reference

Shutdown management class. More...

Static Public Member Functions

static initialize ()
 Register self as main shutdown handler. More...
 
static register_function ($callback, array $params=null)
 Register custom shutdown function. More...
 
static register_signal_handler ($callback, array $params=null)
 Register custom signal handler function. More...
 
static shutdown_handler ()
 
  • do NOT call directly.

 
static signal_handler (int $signo)
 Signal handler for SIGINT, and SIGTERM. More...
 

Static Protected Member Functions

static request_shutdown ()
 Standard shutdown sequence.
 

Static Protected Attributes

static array $callbacks = []
 list of custom callbacks
 
static bool $registered = false
 is this manager already registered?
 
static array $signalcallbacks = []
 list of custom signal callbacks
 

Detailed Description

Shutdown management class.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Member Function Documentation

◆ initialize()

static core_shutdown_manager::initialize ( )
static

Register self as main shutdown handler.

to be called from lib/setup.php only!

◆ register_function()

static core_shutdown_manager::register_function (   $callback,
array  $params = null 
)
static

Register custom shutdown function.

Parameters
callable$callback
array$params
Return values
void

◆ register_signal_handler()

static core_shutdown_manager::register_signal_handler (   $callback,
array  $params = null 
)
static

Register custom signal handler function.

If a handler returns false the signal will be ignored.

Parameters
callable$callback
array$params
Return values
void

◆ signal_handler()

static core_shutdown_manager::signal_handler ( int  $signo)
static

Signal handler for SIGINT, and SIGTERM.

Parameters
int$signoThe signal being handled

The documentation for this class was generated from the following file: