xref: /webtrees/app/Statistics/Repository/Interfaces/MediaRepositoryInterface.php (revision 3976b4703df669696105ed6b024b96d433c8fbdb)
1<?php
2
3/**
4 * webtrees: online genealogy
5 * Copyright (C) 2019 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 <http://www.gnu.org/licenses/>.
16 */
17declare(strict_types=1);
18
19namespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
20
21/**
22 * A repository providing methods for media type related statistics.
23 */
24interface MediaRepositoryInterface
25{
26    /**
27     * Count the number of media records.
28     *
29     * @return string
30     */
31    public function totalMedia(): string;
32
33    /**
34     * Count the number of media records with type "audio".
35     *
36     * @return string
37     */
38    public function totalMediaAudio(): string;
39
40    /**
41     * Count the number of media records with type "book".
42     *
43     * @return string
44     */
45    public function totalMediaBook(): string;
46
47    /**
48     * Count the number of media records with type "card".
49     *
50     * @return string
51     */
52    public function totalMediaCard(): string;
53
54    /**
55     * Count the number of media records with type "certificate".
56     *
57     * @return string
58     */
59    public function totalMediaCertificate(): string;
60
61    /**
62     * Count the number of media records with type "coat of arms".
63     *
64     * @return string
65     */
66    public function totalMediaCoatOfArms(): string;
67
68    /**
69     * Count the number of media records with type "document".
70     *
71     * @return string
72     */
73    public function totalMediaDocument(): string;
74
75    /**
76     * Count the number of media records with type "electronic".
77     *
78     * @return string
79     */
80    public function totalMediaElectronic(): string;
81
82    /**
83     * Count the number of media records with type "magazine".
84     *
85     * @return string
86     */
87    public function totalMediaMagazine(): string;
88
89    /**
90     * Count the number of media records with type "manuscript".
91     *
92     * @return string
93     */
94    public function totalMediaManuscript(): string;
95
96    /**
97     * Count the number of media records with type "map".
98     *
99     * @return string
100     */
101    public function totalMediaMap(): string;
102
103    /**
104     * Count the number of media records with type "microfiche".
105     *
106     * @return string
107     */
108    public function totalMediaFiche(): string;
109
110    /**
111     * Count the number of media records with type "microfilm".
112     *
113     * @return string
114     */
115    public function totalMediaFilm(): string;
116
117    /**
118     * Count the number of media records with type "newspaper".
119     *
120     * @return string
121     */
122    public function totalMediaNewspaper(): string;
123
124    /**
125     * Count the number of media records with type "painting".
126     *
127     * @return string
128     */
129    public function totalMediaPainting(): string;
130
131    /**
132     * Count the number of media records with type "photograph".
133     *
134     * @return string
135     */
136    public function totalMediaPhoto(): string;
137
138    /**
139     * Count the number of media records with type "tombstone".
140     *
141     * @return string
142     */
143    public function totalMediaTombstone(): string;
144
145    /**
146     * Count the number of media records with type "video".
147     *
148     * @return string
149     */
150    public function totalMediaVideo(): string;
151
152    /**
153     * Count the number of media records with type "other".
154     *
155     * @return string
156     */
157    public function totalMediaOther(): string;
158
159    /**
160     * Count the number of media records with type "unknown".
161     *
162     * @return string
163     */
164    public function totalMediaUnknown(): string;
165
166    /**
167     * Create a chart of media types.
168     *
169     * @param string|null $color_from
170     * @param string|null $color_to
171     *
172     * @return string
173     */
174    public function chartMedia(string $color_from = null, string $color_to = null): string;
175}
176