xref: /PHP-8.1/ext/pspell/pspell.stub.php (revision c8f858ef)
1<?php
2
3/** @generate-class-entries */
4
5namespace PSpell {
6
7    /**
8     * @strict-properties
9     * @not-serializable
10     */
11    final class Dictionary {}
12
13    /**
14     * @strict-properties
15     * @not-serializable
16     */
17    final class Config {}
18
19}
20
21namespace {
22
23    function pspell_new(string $language, string $spelling = "", string $jargon = "", string $encoding = "", int $mode = 0): PSpell\Dictionary|false {}
24
25    function pspell_new_personal(
26        string $filename,
27        string $language,
28        string $spelling = "",
29        string $jargon = "",
30        string $encoding = "",
31        int $mode = 0
32    ): PSpell\Dictionary|false {}
33
34    function pspell_new_config(PSpell\Config $config): PSpell\Dictionary|false {}
35
36    function pspell_check(PSpell\Dictionary $dictionary, string $word): bool {}
37
38    /**
39     * @return array<int, string>|false
40     * @refcount 1
41     */
42    function pspell_suggest(PSpell\Dictionary $dictionary, string $word): array|false {}
43    function pspell_store_replacement(PSpell\Dictionary $dictionary, string $misspelled, string $correct): bool {}
44    function pspell_add_to_personal(PSpell\Dictionary $dictionary, string $word): bool {}
45    function pspell_add_to_session(PSpell\Dictionary $dictionary, string $word): bool {}
46    function pspell_clear_session(PSpell\Dictionary $dictionary): bool {}
47    function pspell_save_wordlist(PSpell\Dictionary $dictionary): bool {}
48
49    function pspell_config_create(string $language, string $spelling = "", string $jargon = "", string $encoding = ""): PSpell\Config {}
50    function pspell_config_runtogether(PSpell\Config $config, bool $allow): bool {}
51    function pspell_config_mode(PSpell\Config $config, int $mode): bool {}
52    function pspell_config_ignore(PSpell\Config $config, int $min_length): bool {}
53    function pspell_config_personal(PSpell\Config $config, string $filename): bool {}
54    function pspell_config_dict_dir(PSpell\Config $config, string $directory): bool {}
55    function pspell_config_data_dir(PSpell\Config $config, string $directory): bool {}
56    function pspell_config_repl(PSpell\Config $config, string $filename): bool {}
57    function pspell_config_save_repl(PSpell\Config $config, bool $save): bool {}
58
59}
60