xref: /webtrees/app/Statistics/Repository/Interfaces/PlaceRepositoryInterface.php (revision 11eb858145c6c7c490e5c0cd7b0bd51e519264f0)
1<?php
2/**
3 * webtrees: online genealogy
4 * Copyright (C) 2018 webtrees development team
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation, either version 3 of the License, or
8 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16declare(strict_types=1);
17
18namespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
19
20/**
21 * A repository providing methods for place related statistics.
22 */
23interface PlaceRepositoryInterface
24{
25    /**
26     * Places
27     *
28     * @param string $what
29     * @param string $fact
30     * @param int    $parent
31     * @param bool   $country
32     *
33     * @return int[]|\stdClass[]
34     */
35    public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent = 0, bool $country = false): array;
36
37    /**
38     * A list of common birth places.
39     *
40     * @return string
41     */
42    public function commonBirthPlacesList(): string;
43
44    /**
45     * A list of common death places.
46     *
47     * @return string
48     */
49    public function commonDeathPlacesList(): string;
50
51    /**
52     * A list of common marriage places.
53     *
54     * @return string
55     */
56    public function commonMarriagePlacesList(): string;
57
58    /**
59     * A list of common countries.
60     *
61     * @return string
62     */
63    public function commonCountriesList(): string;
64
65    /**
66     * Count total places.
67     *
68     * @return string
69     */
70    public function totalPlaces(): string;
71
72    /**
73     * Create a chart showing where events occurred.
74     *
75     * @param string $chart_shows
76     * @param string $chart_type
77     * @param string $surname
78     *
79     * @return string
80     */
81    public function chartDistribution(
82        string $chart_shows = 'world',
83        string $chart_type  = '',
84        string $surname     = ''
85    ) : string;
86}
87