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

@author Cedric Alfonsi, <cedric.alfonsi@tudor.lu>
@param  string mode
@throws InvalidArgumentException If the mode variable is not a string or is empty.
load a new current mode