array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'ru', ), 'this' => array ( 0 => 'function.enchant-dict-store-replacement.php', 1 => 'enchant_dict_store_replacement', ), 'up' => array ( 0 => 'ref.enchant.php', 1 => 'Функции Enchant', ), 'prev' => array ( 0 => 'function.enchant-dict-quick-check.php', 1 => 'enchant_dict_quick_check', ), 'next' => array ( 0 => 'function.enchant-dict-suggest.php', 1 => 'enchant_dict_suggest', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'ru', 'path' => 'reference/enchant/functions/enchant-dict-store-replacement.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
(PHP 5 >= 5.3.0, PHP 7, PHP 8, PECL enchant >= 0.1.0 )
enchant_dict_store_replacement — Добавить исправление для слова
$dictionary
, string $misspelled
, string $correct
): voidДобавить исправление 'cor' для 'mis'. Обратите внимание, что если вы замените @mis на @cor, то в будущем вхождения @mis будут заменяться на @cor. Соответственно это может поднять @cor вверх в списке возможных замен.
dictionary
Словарь Enchant, который возвращает функция enchant_broker_request_dict() или enchant_broker_request_pwl_dict().
misspelled
Слово для исправления
correct
Корректное слово
Возвращает true
в случае успешного выполнения или false
, если возникла ошибка.
Версия | Описание |
---|---|
8.0.0 |
Параметр dictionary ожидает экземпляр класса EnchantDictionary;
Раньше параметр ждал ресурс (resource).
|