src/jShutdownManager.php
static public function register( $callBack, $priority = 0 )
	{
		if( !self::$_registered )
		{
			register_shutdown_function( array( __class__, '_registered_shutdown' ) );
			self::$_registered = true;
		}
		$params                                     = func_get_args();
		self::$_registeredCallbacks[ ++self::$_id ] = array( $callBack, (int) $priority, self::$_id,
		                                                     array_slice( $params, 2 )
		);
		return self::$_id;
	}
static public function register( $callBack, $priority = 0 )
	{
		if( !self::$_registered )
		{
			register_shutdown_function( array( __class__, '_registered_shutdown' ) );
			self::$_registered = true;
		}
		$params                                     = func_get_args();
		self::$_registeredCallbacks[ ++self::$_id ] = array( $callBack, (int) $priority, self::$_id,
		                                                     array_slice( $params, 2 )
		);
		return self::$_id;
	}
static public function register ( $ callBack , $ priority = 0 ) { if ( ! self :: $ _registered ) { register_shutdown_function ( array ( __class__ , '_registered_shutdown' ) ) ; self :: $ _registered = true ; } $ params = func_get_args ( ) ; self :: $ _registeredCallbacks [ ++ self :: $ _id ] = array ( $ callBack , ( int ) $ priority , self :: $ _id , array_slice ( $ params , 2 ) ) ; return self :: $ _id ; }
register a callback function to be executed as a shutdown fucntion
@param callback $callBack the callback to register, if already registered then it
@param int      $priority the priority level of the callback (higher level means later call)
@param mixed    $param    you can add as many optionnal parameter as  you want to the callback
@return int     internal callback id
register a callback function to be executed as a shutdown fucntion