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/**
4 * The glossary repository interface.
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public License,
7 * v. 2.0. If a copy of the MPL was not distributed with this file, You can
8 * obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * @package   phpMyFAQ
11 * @author    Thorsten Rinne <thorsten@phpmyfaq.de>
12 * @copyright 2025 phpMyFAQ Team
13 * @license   https://www.mozilla.org/MPL/2.0/ Mozilla Public License Version 2.0
14 * @link      https://www.phpmyfaq.de
15 * @since     2025-11-05
16 */
17
18declare(strict_types=1);
19
20namespace phpMyFAQ\Glossary;
21
22interface GlossaryRepositoryInterface
23{
24    /**
25     * @return array<int, array{id:int, language:string, item:string, definition:string}>
26     */
27    public function fetchAll(string $language): array;
28
29    /**
30     * @return array{id:int, language:string, item:string, definition:string}|array{}
31     */
32    public function fetch(int $id, string $language): array;
33
34    public function create(string $language, string $item, string $definition): bool;
35
36    public function update(int $id, string $language, string $item, string $definition): bool;
37
38    public function delete(int $id, string $language): bool;
39}