Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | namespace MediaWiki\Wikispeech\Lexicon; |
4 | |
5 | /** |
6 | * @file |
7 | * @ingroup Extensions |
8 | * @license GPL-2.0-or-later |
9 | */ |
10 | |
11 | use ExternalStoreException; |
12 | |
13 | /** |
14 | * @since 0.1.8 |
15 | */ |
16 | interface LexiconStorage { |
17 | |
18 | /** |
19 | * @since 0.1.8 |
20 | * @param string $language |
21 | * @param string $key |
22 | * @return LexiconEntry|null |
23 | * @throws ExternalStoreException |
24 | */ |
25 | public function getEntry( |
26 | string $language, |
27 | string $key |
28 | ): ?LexiconEntry; |
29 | |
30 | /** |
31 | * @since 0.1.8 |
32 | * @param string $language |
33 | * @param string $key |
34 | * @param LexiconEntryItem $item Will be updated on success. |
35 | */ |
36 | public function createEntryItem( |
37 | string $language, |
38 | string $key, |
39 | LexiconEntryItem $item |
40 | ): void; |
41 | |
42 | /** |
43 | * @since 0.1.8 |
44 | * @param string $language |
45 | * @param string $key |
46 | * @param LexiconEntryItem $item Will be updated on success. |
47 | */ |
48 | public function updateEntryItem( |
49 | string $language, |
50 | string $key, |
51 | LexiconEntryItem $item |
52 | ): void; |
53 | |
54 | /** |
55 | * @since 0.1.8 |
56 | * @param string $language |
57 | * @param string $key |
58 | * @param LexiconEntryItem $item |
59 | */ |
60 | public function deleteEntryItem( |
61 | string $language, |
62 | string $key, |
63 | LexiconEntryItem $item |
64 | ): void; |
65 | } |