xref: /webtrees/app/Statistics/Repository/Interfaces/MediaRepositoryInterface.php (revision 8634febf6487fcb3ee7b59e88f828071a22cba22)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2023 webtrees development team
6 * This program is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
18declare(strict_types=1);
19
20namespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
21
22/**
23 * A repository providing methods for media type related statistics.
24 */
25interface MediaRepositoryInterface
26{
27    /**
28     * Count the number of media records.
29     *
30     * @return string
31     */
32    public function totalMedia(): string;
33
34    /**
35     * Count the number of media records with type "audio".
36     *
37     * @return string
38     */
39    public function totalMediaAudio(): string;
40
41    /**
42     * Count the number of media records with type "book".
43     *
44     * @return string
45     */
46    public function totalMediaBook(): string;
47
48    /**
49     * Count the number of media records with type "card".
50     *
51     * @return string
52     */
53    public function totalMediaCard(): string;
54
55    /**
56     * Count the number of media records with type "certificate".
57     *
58     * @return string
59     */
60    public function totalMediaCertificate(): string;
61
62    /**
63     * Count the number of media records with type "coat of arms".
64     *
65     * @return string
66     */
67    public function totalMediaCoatOfArms(): string;
68
69    /**
70     * Count the number of media records with type "document".
71     *
72     * @return string
73     */
74    public function totalMediaDocument(): string;
75
76    /**
77     * Count the number of media records with type "electronic".
78     *
79     * @return string
80     */
81    public function totalMediaElectronic(): string;
82
83    /**
84     * Count the number of media records with type "magazine".
85     *
86     * @return string
87     */
88    public function totalMediaMagazine(): string;
89
90    /**
91     * Count the number of media records with type "manuscript".
92     *
93     * @return string
94     */
95    public function totalMediaManuscript(): string;
96
97    /**
98     * Count the number of media records with type "map".
99     *
100     * @return string
101     */
102    public function totalMediaMap(): string;
103
104    /**
105     * Count the number of media records with type "microfiche".
106     *
107     * @return string
108     */
109    public function totalMediaFiche(): string;
110
111    /**
112     * Count the number of media records with type "microfilm".
113     *
114     * @return string
115     */
116    public function totalMediaFilm(): string;
117
118    /**
119     * Count the number of media records with type "newspaper".
120     *
121     * @return string
122     */
123    public function totalMediaNewspaper(): string;
124
125    /**
126     * Count the number of media records with type "painting".
127     *
128     * @return string
129     */
130    public function totalMediaPainting(): string;
131
132    /**
133     * Count the number of media records with type "photograph".
134     *
135     * @return string
136     */
137    public function totalMediaPhoto(): string;
138
139    /**
140     * Count the number of media records with type "tombstone".
141     *
142     * @return string
143     */
144    public function totalMediaTombstone(): string;
145
146    /**
147     * Count the number of media records with type "video".
148     *
149     * @return string
150     */
151    public function totalMediaVideo(): string;
152
153    /**
154     * Count the number of media records with type "other".
155     *
156     * @return string
157     */
158    public function totalMediaOther(): string;
159
160    /**
161     * Count the number of media records with type "unknown".
162     *
163     * @return string
164     */
165    public function totalMediaUnknown(): string;
166
167    /**
168     * Create a chart of media types.
169     *
170     * @param string|null $color_from
171     * @param string|null $color_to
172     *
173     * @return string
174     */
175    public function chartMedia(string $color_from = null, string $color_to = null): string;
176}
177