« 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   インスタンス   期待   ignore   personal   Pspell   suggest   スペルチェッカ   高速   最小   通常   低速   成功   履歴   resource   create   check
関連する関数・ページ:
function.pspell-new-config   function.pspell-config-ignore   function.pspell-config-repl   function.pspell-config-data-dir   function.pspell-new   function.pspell-config-dict-dir