public static function unload($mode)
    {

    	if (!is_string($mode)){
			throw new InvalidArgumentException('Try to unload an irregular mode in the context. The mode must be a string, ' . gettype($mode) . ' given.');
		}
    	else if (empty($mode)){
    		throw new InvalidArgumentException('Cannot unload an empty mode in the context.');
    	}
    	
    	if(in_array($mode, self::$current)){
    		$index = array_search ($mode, self::$current);
    		if ($index !== false){
    			unset (self::$current[$index]);
    		}
    	}
    }
public static function unload($mode)
    {

    	if (!is_string($mode)){
			throw new InvalidArgumentException('Try to unload an irregular mode in the context. The mode must be a string, ' . gettype($mode) . ' given.');
		}
    	else if (empty($mode)){
    		throw new InvalidArgumentException('Cannot unload an empty mode in the context.');
    	}
    	
    	if(in_array($mode, self::$current)){
    		$index = array_search ($mode, self::$current);
    		if ($index !== false){
    			unset (self::$current[$index]);
    		}
    	}
    }
public static function unload ( $ mode ) { if ( ! is_string ( $ mode ) ) { throw new InvalidArgumentException ( 'Try to unload an irregular mode in the context. The mode must be a string, ' . gettype ( $ mode ) . ' given.' ) ; } else if ( empty ( $ mode ) ) { throw new InvalidArgumentException ( 'Cannot unload an empty mode in the context.' ) ; } if ( in_array ( $ mode , self :: $ current ) ) { $ index = array_search ( $ mode , self :: $ current ) ; if ( $ index !== false ) { unset ( self :: $ current [ $ index ] ) ; } } }
Unload a specific mode.

@author Cedric Alfonsi, <cedric.alfonsi@tudor.lu>
@param  string mode
@throws InvalidArgumentException If the mode variable has not the right type (string) or is empty.
Unload a specific mode .