|
2 | 2 |
|
3 | 3 | /** @generate-function-entries */
|
4 | 4 |
|
5 |
| -/** @return resource|false */ |
6 |
| -function enchant_broker_init() {} |
| 5 | +final class EnchantBroker |
| 6 | +{ |
| 7 | + /** @alias enchant_broker_init */ |
| 8 | + public function __construct() {} |
7 | 9 |
|
8 |
| -/** @param resource $broker */ |
9 |
| -function enchant_broker_free($broker): bool {} |
| 10 | + /** @alias enchant_broker_get_error */ |
| 11 | + public function getError(): string|false {} |
| 12 | + |
| 13 | + /** @alias enchant_broker_list_dicts */ |
| 14 | + public function listDicts(): ?array {} |
| 15 | + |
| 16 | + /** @alias enchant_broker_request_dict */ |
| 17 | + public function requestDict(string $tag): EnchantDict|false {} |
| 18 | + |
| 19 | + /** @alias enchant_broker_request_pwl_dict */ |
| 20 | + public function requestPWL(string $filename): EnchantDict|false {} |
| 21 | + |
| 22 | + /** @alias enchant_broker_dict_exists */ |
| 23 | + public function isDict(string $tag): bool {} |
| 24 | + |
| 25 | + /** @alias enchant_broker_set_ordering */ |
| 26 | + public function setOrdering(string $tag, string $ordering): bool {} |
| 27 | + |
| 28 | + /** @alias enchant_broker_describe */ |
| 29 | + public function describe(): ?array {} |
| 30 | +} |
| 31 | + |
| 32 | +final class EnchantDict |
| 33 | +{ |
| 34 | + public function __construct(EnchantBroker $broker, string $tag) {} |
| 35 | + |
| 36 | + /** @alias enchant_dict_quick_check */ |
| 37 | + public function checkAndSuggest(string $word, &$suggestions = null): bool {} |
| 38 | + |
| 39 | + /** @alias enchant_dict_check */ |
| 40 | + public function check(string $word): bool {} |
| 41 | + |
| 42 | + /** @alias enchant_dict_suggest */ |
| 43 | + public function suggest(string $word): ?array {} |
| 44 | + |
| 45 | + /** @alias enchant_dict_add */ |
| 46 | + public function add(string $word): void {} |
| 47 | + |
| 48 | + /** @alias enchant_dict_add_to_session */ |
| 49 | + public function addToSession(string $word): void {} |
| 50 | + |
| 51 | + /** @alias enchant_dict_is_added */ |
| 52 | + public function isAdded(string $word): bool {} |
| 53 | + |
| 54 | + /** @alias enchant_dict_store_replacement */ |
| 55 | + public function storeReplacement(string $mis, string $cor): void {} |
| 56 | + |
| 57 | + /** @alias enchant_dict_get_error */ |
| 58 | + public function getError(): string|false {} |
| 59 | + |
| 60 | + /** @alias enchant_dict_describe */ |
| 61 | + public function describe(): array {} |
| 62 | +} |
| 63 | + |
| 64 | +function enchant_broker_init(): EnchantBroker|false {} |
10 | 65 |
|
11 | 66 | /**
|
12 |
| -* @param resource $broker |
13 |
| -* @return string|false |
| 67 | +* @deprecated |
14 | 68 | */
|
15 |
| -function enchant_broker_get_error($broker) {} |
| 69 | +function enchant_broker_free(EnchantBroker $broker): bool {} |
| 70 | + |
| 71 | +function enchant_broker_get_error(EnchantBroker $broker): string|false {} |
16 | 72 |
|
17 | 73 | /**
|
18 |
| -* @param resource $broker |
19 | 74 | * @deprecated
|
20 | 75 | */
|
21 |
| -function enchant_broker_set_dict_path($broker, int $name, string $value): bool {} |
| 76 | +function enchant_broker_set_dict_path(EnchantBroker $broker, int $name, string $value): bool {} |
22 | 77 |
|
23 | 78 | /**
|
24 |
| -* @param resource $broker |
25 | 79 | * @deprecated
|
26 | 80 | */
|
27 |
| -function enchant_broker_get_dict_path($broker, int $name): string|false {} |
| 81 | +function enchant_broker_get_dict_path(EnchantBroker $broker, int $name): string|false {} |
28 | 82 |
|
29 |
| -/** @param resource $broker */ |
30 |
| -function enchant_broker_list_dicts($broker): ?array {} |
| 83 | +function enchant_broker_list_dicts(EnchantBroker $broker): ?array {} |
31 | 84 |
|
32 |
| -/** |
33 |
| - * @param resource $broker |
34 |
| - * @return resource|false |
35 |
| - */ |
36 |
| -function enchant_broker_request_dict($broker, string $tag) {} |
| 85 | +function enchant_broker_request_dict(EnchantBroker $broker, string $tag): EnchantDict|false {} |
37 | 86 |
|
38 |
| -/** |
39 |
| - * @param resource $broker |
40 |
| - * @return resource|false |
41 |
| - */ |
42 |
| -function enchant_broker_request_pwl_dict($broker, string $filename) {} |
| 87 | +function enchant_broker_request_pwl_dict(EnchantBroker $broker, string $filename): EnchantDict|false {} |
43 | 88 |
|
44 |
| -/** @param resource $dict */ |
45 |
| -function enchant_broker_free_dict($dict): bool {} |
| 89 | +/** |
| 90 | +* @deprecated |
| 91 | +*/ |
| 92 | +function enchant_broker_free_dict(EnchantDict $dict): bool {} |
46 | 93 |
|
47 |
| -/** @param resource $broker */ |
48 |
| -function enchant_broker_dict_exists($broker, string $tag): bool {} |
| 94 | +function enchant_broker_dict_exists(EnchantBroker $broker, string $tag): bool {} |
49 | 95 |
|
50 |
| -/** @param resource $broker */ |
51 |
| -function enchant_broker_set_ordering($broker, string $tag, string $ordering): bool {} |
| 96 | +function enchant_broker_set_ordering(EnchantBroker $broker, string $tag, string $ordering): bool {} |
52 | 97 |
|
53 |
| -/** @param resource $broker */ |
54 |
| -function enchant_broker_describe($broker): ?array {} |
| 98 | +function enchant_broker_describe(EnchantBroker $broker): ?array {} |
55 | 99 |
|
56 |
| -/** @param resource $dict */ |
57 |
| -function enchant_dict_quick_check($dict, string $word, &$suggestions = null): bool {} |
| 100 | +function enchant_dict_quick_check(EnchantDict $dict, string $word, &$suggestions = null): bool {} |
58 | 101 |
|
59 |
| -/** @param resource $dict */ |
60 |
| -function enchant_dict_check($dict, string $word): bool {} |
| 102 | +function enchant_dict_check(EnchantDict $dict, string $word): bool {} |
61 | 103 |
|
62 |
| -/** @param resource $dict */ |
63 |
| -function enchant_dict_suggest($dict, string $word): ?array {} |
| 104 | +function enchant_dict_suggest(EnchantDict $dict, string $word): ?array {} |
64 | 105 |
|
65 |
| -/** @param resource $dict */ |
66 |
| -function enchant_dict_add($dict, string $word): void {} |
| 106 | +function enchant_dict_add(EnchantDict $dict, string $word): void {} |
67 | 107 |
|
68 | 108 | /**
|
69 |
| -* @param resource $dict |
70 | 109 | * @alias enchant_dict_add
|
71 | 110 | * @deprecated
|
72 | 111 | */
|
73 |
| -function enchant_dict_add_to_personal($dict, string $word): void {} |
| 112 | +function enchant_dict_add_to_personal(EnchantDict $dict, string $word): void {} |
74 | 113 |
|
75 |
| -/** @param resource $dict */ |
76 |
| -function enchant_dict_add_to_session($dict, string $word): void {} |
| 114 | +function enchant_dict_add_to_session(EnchantDict $dict, string $word): void {} |
77 | 115 |
|
78 |
| -/** @param resource $dict */ |
79 |
| -function enchant_dict_is_added($dict, string $word): bool {} |
| 116 | +function enchant_dict_is_added(EnchantDict $dict, string $word): bool {} |
80 | 117 |
|
81 | 118 | /**
|
82 | 119 | * @param resource $dict
|
83 | 120 | * @alias enchant_dict_is_added
|
84 | 121 | * @deprecated
|
85 | 122 | */
|
86 |
| -function enchant_dict_is_in_session($dict, string $word): bool {} |
| 123 | +function enchant_dict_is_in_session(EnchantDict $dict, string $word): bool {} |
| 124 | + |
| 125 | +function enchant_dict_store_replacement(EnchantDict $dict, string $mis, string $cor): void {} |
87 | 126 |
|
88 |
| -/** @param resource $dict */ |
89 |
| -function enchant_dict_store_replacement($dict, string $mis, string $cor): void {} |
| 127 | +function enchant_dict_get_error(EnchantDict $dict): string|false {} |
90 | 128 |
|
91 |
| -/** @param resource $dict */ |
92 |
| -function enchant_dict_get_error($dict): string|false {} |
| 129 | +function enchant_dict_describe(EnchantDict $dict): array {} |
93 | 130 |
|
94 |
| -/** @param resource $dict */ |
95 |
| -function enchant_dict_describe($dict): array {} |
|
0 commit comments