« pspell_config_ignore
pspell_config_personal »

pspell_config_mode

(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)

pspell_config_mode — 返される提案の数のモードを変更する

説明

function pspell_config_mode(PSpell\Config $config, int $mode): bool

pspell_config_mode() は、 pspell_new_config() のコール前に設定を行う際に使用します。この関数は、 pspell_suggest() により返される修正候補の数を定義します。

パラメータ

config

PSpell\Config クラスのインスタンス。

mode

パラメータ mode は、スペルチェッカの動作モードです。 使用可能なモードを以下に示します。

戻り値

成功した場合に true を、失敗した場合に false を返します。

変更履歴

バージョン 説明
8.1.0 引数 config は、PSpell\Config クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、resource を期待していました。

例

例1 pspell_config_mode() の例

<?php
$pspell_config = pspell_config_create("en");
pspell_config_mode($pspell_config, PSPELL_FAST);
$pspell = pspell_new_config($pspell_config);
pspell_check($pspell, "thecat");
?>

関連キーワード:
pspell   config   mode   モード   候補   PSpell   Config   インスタンス   personal   Pspell   suggest   スペルチェッカ   最小   resource   check   thecat
関連する関数・ページ:
function.pspell-config-ignore   function.pspell-config-runtogether   function.pspell-config-personal   function.pspell-config-dict-dir   function.pspell-new-config   book.pspell