2024 PHP Conference Japan

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

新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top