diff options
author | Andrew Dolgov <[email protected]> | 2015-06-19 10:12:47 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2015-06-19 10:12:47 +0300 |
commit | 3318d324105ee222a54afc94076878c12b588c24 (patch) | |
tree | a12222c9add62f165946cf6b03a6cd7e885350d8 /plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php | |
parent | 724e08f1c01bb60681616e3b1ddc14bc0648de3a (diff) |
move language detection to a plugin, remove config.php constant
Diffstat (limited to 'plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php')
-rw-r--r-- | plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php b/plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php new file mode 100644 index 000000000..196d994f5 --- /dev/null +++ b/plugins/af_lang_detect/languagedetect/Text/LanguageDetect/Exception.php @@ -0,0 +1,57 @@ +<?php +class Text_LanguageDetect_Exception extends Exception +{ + /** + * Database file could not be found + */ + const DB_NOT_FOUND = 10; + + /** + * Database file found, but not readable + */ + const DB_NOT_READABLE = 11; + + /** + * Database file is empty + */ + const DB_EMPTY = 12; + + /** + * Database contents is not a PHP array + */ + const DB_NOT_ARRAY = 13; + + /** + * Magic quotes are activated + */ + const MAGIC_QUOTES = 14; + + + /** + * Parameter of invalid type passed to method + */ + const PARAM_TYPE = 20; + + /** + * Character in parameter is invalid + */ + const INVALID_CHAR = 21; + + + /** + * Language is not in the database + */ + const UNKNOWN_LANGUAGE = 30; + + + /** + * Error during block detection + */ + const BLOCK_DETECTION = 40; + + + /** + * Error while clustering languages + */ + const NO_HIGHEST_KEY = 50; +} |