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 | * Database service interface for feedback. |
5 | * |
6 | * PHP version 8 |
7 | * |
8 | * Copyright (C) Villanova University 2024. |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify |
11 | * it under the terms of the GNU General Public License version 2, |
12 | * as published by the Free Software Foundation. |
13 | * |
14 | * This program is distributed in the hope that it will be useful, |
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | * GNU General Public License for more details. |
18 | * |
19 | * You should have received a copy of the GNU General Public License |
20 | * along with this program; if not, write to the Free Software |
21 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
22 | * |
23 | * @category VuFind |
24 | * @package Database |
25 | * @author Demian Katz <demian.katz@villanova.edu> |
26 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
27 | * @link https://vufind.org/wiki/development:plugins:database_gateways Wiki |
28 | */ |
29 | |
30 | namespace VuFind\Db\Service; |
31 | |
32 | use Laminas\Paginator\Paginator; |
33 | use VuFind\Db\Entity\FeedbackEntityInterface; |
34 | |
35 | /** |
36 | * Database service interface for feedback. |
37 | * |
38 | * @category VuFind |
39 | * @package Database |
40 | * @author Demian Katz <demian.katz@villanova.edu> |
41 | * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License |
42 | * @link https://vufind.org/wiki/development:plugins:database_gateways Wiki |
43 | */ |
44 | interface FeedbackServiceInterface extends DbServiceInterface |
45 | { |
46 | /** |
47 | * Create a feedback entity object. |
48 | * |
49 | * @return FeedbackEntityInterface |
50 | */ |
51 | public function createEntity(): FeedbackEntityInterface; |
52 | |
53 | /** |
54 | * Fetch a feedback entity by ID. |
55 | * |
56 | * @param int $id ID of feedback entity |
57 | * |
58 | * @return ?FeedbackEntityInterface |
59 | */ |
60 | public function getFeedbackById(int $id): ?FeedbackEntityInterface; |
61 | |
62 | /** |
63 | * Get feedback by filter |
64 | * |
65 | * @param ?string $formName Form name (optional filter) |
66 | * @param ?string $siteUrl Site URL (optional filter) |
67 | * @param ?string $status Current status (optional filter) |
68 | * @param ?int $page Current page (optional) |
69 | * @param int $limit Limit per page |
70 | * |
71 | * @return Paginator |
72 | */ |
73 | public function getFeedbackPaginator( |
74 | ?string $formName = null, |
75 | ?string $siteUrl = null, |
76 | ?string $status = null, |
77 | ?int $page = null, |
78 | int $limit = 20 |
79 | ): Paginator; |
80 | |
81 | /** |
82 | * Delete feedback by ids |
83 | * |
84 | * @param array $ids IDs |
85 | * |
86 | * @return int Count of deleted rows |
87 | */ |
88 | public function deleteByIdArray(array $ids): int; |
89 | |
90 | /** |
91 | * Get unique values for a column of the feedback table |
92 | * |
93 | * @param string $column Column name |
94 | * |
95 | * @return array |
96 | */ |
97 | public function getUniqueColumn(string $column): array; |
98 | } |