« pspell_check
pspell_config_create »

pspell_clear_session

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

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

説明

function pspell_clear_session(PSpell\Dictionary $dictionary): bool

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

パラメータ

dictionary

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

戻り値

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

変更履歴

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

例

例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" は保存されません。
?>

関連キーワード:
pspell   config   clear   session   セッション   クリア   PSpell   Dictionary   dictionary   personal   create   save   wordlist   インスタンス   期待   Vlad   check   Pspell   単語   ブランク   成功   履歴   resource   dictionaries   custom
関連する関数・ページ:
function.pspell-save-wordlist   function.pspell-new-config   function.pspell-add-to-personal   function.pspell-add-to-session   function.pspell-check   book.pspell