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
3namespace MediaWiki\Wikispeech\Lexicon;
4
5/**
6 * @file
7 * @ingroup Extensions
8 * @license GPL-2.0-or-later
9 */
10
11/**
12 * @since 0.1.8
13 */
14interface LexiconLocalStorage extends LexiconStorage {
15
16    /**
17     * Whether or not a {@link LexiconEntryItem} exists in the storage.
18     * This says nothing about the equality of the pronunciation of $item and the item in the storage,
19     * it only means that they are the same words with the same semantic meaning.
20     *
21     * @note Currently we are only able to match semantics by comparing the Speechoid identity
22     *  between items. This is not a solution for the long run as identities might change as
23     *  Speechoid is reinstalled or updated. Future implementations will have to contain a way
24     *  to evaluate equality between items by actually inspecting the semantics.
25     *
26     * @since 0.1.8
27     * @param string $language
28     * @param string $key
29     * @param LexiconEntryItem $item
30     * @return bool
31     */
32    public function entryItemExists(
33        string $language,
34        string $key,
35        LexiconEntryItem $item
36    ): bool;
37
38}