1<?php 2 3/** 4 * webtrees: online genealogy 5 * Copyright (C) 2021 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 place related statistics. 24 */ 25interface PlaceRepositoryInterface 26{ 27 /** 28 * Places 29 * 30 * @param string $what 31 * @param string $fact 32 * @param int $parent 33 * @param bool $country 34 * 35 * @return array<int|object> 36 */ 37 public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent = 0, bool $country = false): array; 38 39 /** 40 * A list of common birth places. 41 * 42 * @return string 43 */ 44 public function commonBirthPlacesList(): string; 45 46 /** 47 * A list of common death places. 48 * 49 * @return string 50 */ 51 public function commonDeathPlacesList(): string; 52 53 /** 54 * A list of common marriage places. 55 * 56 * @return string 57 */ 58 public function commonMarriagePlacesList(): string; 59 60 /** 61 * A list of common countries. 62 * 63 * @return string 64 */ 65 public function commonCountriesList(): string; 66 67 /** 68 * Count total places. 69 * 70 * @return string 71 */ 72 public function totalPlaces(): string; 73 74 /** 75 * Create a chart showing where events occurred. 76 * 77 * @param string $chart_shows 78 * @param string $chart_type 79 * @param string $surname 80 * 81 * @return string 82 */ 83 public function chartDistribution( 84 string $chart_shows = 'world', 85 string $chart_type = '', 86 string $surname = '' 87 ): string; 88} 89