ZEND_ARG_INFO(1, error)
ZEND_END_ARG_INFO()
+#if U_ICU_VERSION_MAJOR_NUM >= 51
ZEND_BEGIN_ARG_INFO_EX(spoofchecker_set_restriction_level, 0, 0, 1)
ZEND_ARG_INFO(0, level)
ZEND_END_ARG_INFO()
+#endif
/* }}} */
PHP_ME(Spoofchecker, areConfusable, spoofchecker_are_confusable, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, setAllowedLocales, spoofchecker_set_allowed_locales, ZEND_ACC_PUBLIC)
PHP_ME(Spoofchecker, setChecks, spoofchecker_set_checks, ZEND_ACC_PUBLIC)
+#if U_ICU_VERSION_MAJOR_NUM >= 51
PHP_ME(Spoofchecker, setRestrictionLevel, spoofchecker_set_restriction_level, ZEND_ACC_PUBLIC)
+#endif
PHP_FE_END
};
/* }}} */
RETURN_FALSE; \
} \
-#if U_ICU_VERSION_MAJOR_NUM >= 58
+#if U_ICU_VERSION_MAJOR_NUM >= 51
#define SPOOFCHECKER_DEFAULT_RESTRICTION_LEVEL USPOOF_HIGHLY_RESTRICTIVE
#endif
co->uspoof = uspoof_open(SPOOFCHECKER_ERROR_CODE_P(co));
INTL_METHOD_CHECK_STATUS(co, "spoofchecker: unable to open ICU Spoof Checker");
-#if U_ICU_VERSION_MAJOR_NUM >= 58
+#if U_ICU_VERSION_MAJOR_NUM >= 51
/* TODO save it into the object for further suspiction check comparison. */
/* ICU 58 removes WSC and MSC handling. However there are restriction
levels as defined in
}
/* }}} */
+#if U_ICU_VERSION_MAJOR_NUM >= 53
/* {{{ proto void Spoofchecker::setRestrictionLevel( int $restriction_level )
* Set the loosest restriction level allowed for strings.
*/
uspoof_setRestrictionLevel(co->uspoof, (URestrictionLevel)level);
}
/* }}} */
+#endif
/*
* Local variables:
PHP_METHOD(Spoofchecker, areConfusable);
PHP_METHOD(Spoofchecker, setAllowedLocales);
PHP_METHOD(Spoofchecker, setChecks);
+#if U_ICU_VERSION_MAJOR_NUM >= 51
PHP_METHOD(Spoofchecker, setRestrictionLevel);
+#endif
#endif // SPOOFCHECKER_MAIN_H