function formatBoolean($value){
		if(is_string($value)){
			if(strtoupper($value) == "TRUE"){
				$value = '1';
			}else if(strtoupper($value) == "FALSE"){
				$value = '0';
			}else{
				throw new InvalidInputException("Not a boolean value");
			}
		}elseif ($value == true){
			$value = '1';
		}elseif ($value == false){
			$value = '0';
		}else{
			throw new InvalidInputException("Not a boolean value");
		}
		return $value;
	}