PHP enchant Functions
EditRocket provides the following information on enchant functions in the PHP source code builder.
array enchant_broker_describe ( resource $broker ) - Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo().
bool enchant_broker_dict_exists ( resource $broker , string $tag ) - Tells if a dictionary exists or not, using a non-empty tags
bool enchant_broker_free ( resource $broker ) - Free a broker resource with all its dictionaries.
bool enchant_broker_free_dict ( resource $dict ) - Free a dictionary resource.
string enchant_broker_get_error ( resource $broker ) - Returns the last error which occurred in this broker.
resource enchant_broker_init ( void ) -
mixed enchant_broker_list_dicts ( resource $broker ) - Returns a list of available dictionaries with their details.
resource enchant_broker_request_dict ( resource $broker , string $tag ) - create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for (en_US, de_DE, ...)
resource enchant_broker_request_pwl_dict ( resource $broker , string $filename ) - creates a dictionary using a PWL file. A PWL file is personal word file one word per line.
bool enchant_broker_set_ordering ( resource $broker , string $tag , string $ordering ) - Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the * tag can be used as a language tag to declare a default ordering for any language that does not explicitly declare an ordering.
void enchant_dict_add_to_personal ( resource $dict , string $word ) - Add a word to personal word list of the given dictionary.
void enchant_dict_add_to_session ( resource $dict , string $word ) - Add a word to the given dictionary. It will be added only for the active spell-checking session.
bool enchant_dict_check ( resource $dict , string $word ) - If the word is correctly spelled return TRUE, otherwise return FALSE
mixed enchant_dict_describe ( resource $dict ) - Returns the details of the dictionary.
string enchant_dict_get_error ( resource $dict ) - Returns the last error of the current spelling-session
bool enchant_dict_is_in_session ( resource $dict , string $word ) - Tells whether or not a word already exists in the current session.
bool enchant_dict_quick_check ( resource $dict , string $word [, array &$suggestions ] ) - If the word is correctly spelled return TRUE, otherwise return FALSE, if suggestions variable is provided, fill it with spelling alternatives.
void enchant_dict_store_replacement ( resource $dict , string $mis , string $cor ) - Add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list.
array enchant_dict_suggest ( resource $dict , string $word ) -