Pspell pspell_add_to_personal
(PHP 4 >= 4.0.2, PHP 5, PHP 7, PHP 8)
pspell_add_to_personal — 개인 단어 목록에 단어 추가
설명
pspell_add_to_personal(PSpell\Dictionary $dictionary
, string $word
): bool
pspell_add_to_personal()은 개인 단어 목록에 단어를 추가합니다. 사전을 열기 위해 pspell_config_personal()과 함께 pspell_new_config()를 사용했다면 나중에 pspell_save_wordlist()로 단어 목록을 저장할 수 있습니다.
매개변수
dictionary
- PSpell\Dictionary 인스턴스입니다.
word
- The added word.
반환 값
성공하면 true
를, 실패하면 false
를 반환합니다.
변경 로그
버전 | 설명 |
---|---|
8.1.0 | dictionary 매개변수는 이제 PSpell\Dictionary 인스턴스를 필요로 합니다. 이전에는 리소스가 필요했습니다. |
Examples
예제 #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_save_wordlist($pspell);
?>
메모
메모: 이 함수는 pspell .11.2 및 aspell .32.5 이상이 없으면 작동하지 않습니다.