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]);
    		}
    	}
    }