function PEAR::registerShutdownFunc in Calendar Systems 5
Use this function to register a shutdown method for static classes.
@access public
Parameters
mixed $func The function name (or array of class/method) to call:
mixed $args The arguments to pass to the function:
Return value
void
File
- calendar/
lib/ PEAR.php, line 253
Class
- PEAR
- Base class for other PEAR classes. Provides rudimentary emulation of destructors.
Code
function registerShutdownFunc($func, $args = []) {
// if we are called statically, there is a potential
// that no shutdown func is registered. Bug #6445
if (!isset($GLOBALS['_PEAR_SHUTDOWN_REGISTERED'])) {
register_shutdown_function("_PEAR_call_destructors");
$GLOBALS['_PEAR_SHUTDOWN_REGISTERED'] = true;
}
$GLOBALS['_PEAR_shutdown_funcs'][] = array(
$func,
$args,
);
}