src/jShutdownManager.php
static public function unregister( $callBack )
	{
		if( is_null( $callBack ) )
		{
			self::$_registeredCallbacks = array();
			return true;
		}
		if( is_int( $callBack ) )
		{
			if( !isset( self::$_registered[ $callBack ] ) )
			{
				return false;
			}
			unset( self::$_registered[ $callBack ] );
			return true;
		}
		foreach( self::$_registeredCallbacks as $k => $cb )
		{
			if( $cb[ 0 ] === $callBack )
			{
				unset( self::$_registeredCallbacks[ $k ] );
				return true;
			}
		}
		return false;
	}
static public function unregister( $callBack )
	{
		if( is_null( $callBack ) )
		{
			self::$_registeredCallbacks = array();
			return true;
		}
		if( is_int( $callBack ) )
		{
			if( !isset( self::$_registered[ $callBack ] ) )
			{
				return false;
			}
			unset( self::$_registered[ $callBack ] );
			return true;
		}
		foreach( self::$_registeredCallbacks as $k => $cb )
		{
			if( $cb[ 0 ] === $callBack )
			{
				unset( self::$_registeredCallbacks[ $k ] );
				return true;
			}
		}
		return false;
	}
static public function unregister ( $ callBack ) { if ( is_null ( $ callBack ) ) { self :: $ _registeredCallbacks = array ( ) ; return true ; } if ( is_int ( $ callBack ) ) { if ( ! isset ( self :: $ _registered [ $ callBack ] ) ) { return false ; } unset ( self :: $ _registered [ $ callBack ] ) ; return true ; } foreach ( self :: $ _registeredCallbacks as $ k => $ cb ) { if ( $ cb [ 0 ] === $ callBack ) { unset ( self :: $ _registeredCallbacks [ $ k ] ) ; return true ; } } return false ; }
unregister previously registered callback
@param callback $callBack the callback to unregister (or the callback id returned by register method )
/!\ if null is given then will unregister all previously registered callback.
@return bool return true if successfully removed else return false
unregister previously registered callback