CakeFest 2024: The Official CakePHP Conference

pspell_clear_session

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

pspell_clear_session現在のセッションをクリアする

説明

pspell_clear_session(PSpell\Dictionary $dictionary): bool

pspell_clear_session() は、 現在のセッションをクリアします。現在の単語リストはブランクになり、 例えば pspell_save_wordlist() でこのリストを保存しても何もおきません。

パラメータ

dictionary

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

戻り値

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

変更履歴

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

例1 pspell_add_to_personal() の例

<?php
$pspell_config
= pspell_config_create("en");
pspell_config_personal($pspell_config, "/var/dictionaries/custom.pws");
$pspell = pspell_new_config($pspell_config);

pspell_add_to_personal($pspell, "Vlad");
pspell_clear_session($pspell);
pspell_save_wordlist($pspell); //"Vlad" は保存されません。
?>

add a note

User Contributed Notes

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