public static function check($mode)
    {
        $returnValue = (bool) false;
        
    	if (!is_string($mode)){
			throw new InvalidArgumentException('Try to check an irregular mode. The mode must be a string, ' . gettype($mode) . ' given.');
		}
    	else if (empty($mode)){
    		throw new InvalidArgumentException('Cannot check an empty mode.');
    	}
    	
    	$returnValue = in_array($mode, self::$current);

        return (bool) $returnValue;
    }
public static function check($mode)
    {
        $returnValue = (bool) false;
        
    	if (!is_string($mode)){
			throw new InvalidArgumentException('Try to check an irregular mode. The mode must be a string, ' . gettype($mode) . ' given.');
		}
    	else if (empty($mode)){
    		throw new InvalidArgumentException('Cannot check an empty mode.');
    	}
    	
    	$returnValue = in_array($mode, self::$current);

        return (bool) $returnValue;
    }
public static function check ( $ mode ) { $ returnValue = ( bool ) false ; if ( ! is_string ( $ mode ) ) { throw new InvalidArgumentException ( 'Try to check an irregular mode. The mode must be a string, ' . gettype ( $ mode ) . ' given.' ) ; } else if ( empty ( $ mode ) ) { throw new InvalidArgumentException ( 'Cannot check an empty mode.' ) ; } $ returnValue = in_array ( $ mode , self :: $ current ) ; return ( bool ) $ returnValue ; }
check if the mode in parameter is loaded in the context.

@author Cedric Alfonsi, <cedric.alfonsi@tudor.lu>
@param  string mode The mode you want to check it is loaded or not.
@return boolean
@throws InvalidArgumentException If the mode variable is not a string or is empty.
check if the mode in parameter is loaded in the context .