CakeFest 2024: The Official CakePHP Conference

pspell_config_mode

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

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

説明

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 クラスのインスタンスを期待するようになりました。 これより前のバージョンでは、リソース を期待していました。

例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");
?>

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top