xref: /webtrees/app/Statistics/Repository/Interfaces/PlaceRepositoryInterface.php (revision 6ccdf4f0fd1b65a5d54259c969912382ce49629d)
18add1155SRico Sonntag<?php
28add1155SRico Sonntag/**
38add1155SRico Sonntag * webtrees: online genealogy
4242a7862SGreg Roach * Copyright (C) 2019 webtrees development team
58add1155SRico Sonntag * This program is free software: you can redistribute it and/or modify
68add1155SRico Sonntag * it under the terms of the GNU General Public License as published by
78add1155SRico Sonntag * the Free Software Foundation, either version 3 of the License, or
88add1155SRico Sonntag * (at your option) any later version.
98add1155SRico Sonntag * This program is distributed in the hope that it will be useful,
108add1155SRico Sonntag * but WITHOUT ANY WARRANTY; without even the implied warranty of
118add1155SRico Sonntag * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
128add1155SRico Sonntag * GNU General Public License for more details.
138add1155SRico Sonntag * You should have received a copy of the GNU General Public License
148add1155SRico Sonntag * along with this program. If not, see <http://www.gnu.org/licenses/>.
158add1155SRico Sonntag */
168add1155SRico Sonntagdeclare(strict_types=1);
178add1155SRico Sonntag
188add1155SRico Sonntagnamespace Fisharebest\Webtrees\Statistics\Repository\Interfaces;
198add1155SRico Sonntag
20*6ccdf4f0SGreg Roachuse stdClass;
21*6ccdf4f0SGreg Roach
228add1155SRico Sonntag/**
238add1155SRico Sonntag * A repository providing methods for place related statistics.
248add1155SRico Sonntag */
258add1155SRico Sonntaginterface PlaceRepositoryInterface
268add1155SRico Sonntag{
278add1155SRico Sonntag    /**
288add1155SRico Sonntag     * Places
298add1155SRico Sonntag     *
308add1155SRico Sonntag     * @param string $what
318add1155SRico Sonntag     * @param string $fact
328add1155SRico Sonntag     * @param int    $parent
338add1155SRico Sonntag     * @param bool   $country
348add1155SRico Sonntag     *
35*6ccdf4f0SGreg Roach     * @return int[]|stdClass[]
368add1155SRico Sonntag     */
378add1155SRico Sonntag    public function statsPlaces(string $what = 'ALL', string $fact = '', int $parent = 0, bool $country = false): array;
388add1155SRico Sonntag
398add1155SRico Sonntag    /**
408add1155SRico Sonntag     * A list of common birth places.
418add1155SRico Sonntag     *
428add1155SRico Sonntag     * @return string
438add1155SRico Sonntag     */
448add1155SRico Sonntag    public function commonBirthPlacesList(): string;
458add1155SRico Sonntag
468add1155SRico Sonntag    /**
478add1155SRico Sonntag     * A list of common death places.
488add1155SRico Sonntag     *
498add1155SRico Sonntag     * @return string
508add1155SRico Sonntag     */
518add1155SRico Sonntag    public function commonDeathPlacesList(): string;
528add1155SRico Sonntag
538add1155SRico Sonntag    /**
548add1155SRico Sonntag     * A list of common marriage places.
558add1155SRico Sonntag     *
568add1155SRico Sonntag     * @return string
578add1155SRico Sonntag     */
588add1155SRico Sonntag    public function commonMarriagePlacesList(): string;
598add1155SRico Sonntag
608add1155SRico Sonntag    /**
618add1155SRico Sonntag     * A list of common countries.
628add1155SRico Sonntag     *
638add1155SRico Sonntag     * @return string
648add1155SRico Sonntag     */
658add1155SRico Sonntag    public function commonCountriesList(): string;
668add1155SRico Sonntag
678add1155SRico Sonntag    /**
688add1155SRico Sonntag     * Count total places.
698add1155SRico Sonntag     *
708add1155SRico Sonntag     * @return string
718add1155SRico Sonntag     */
728add1155SRico Sonntag    public function totalPlaces(): string;
738add1155SRico Sonntag
748add1155SRico Sonntag    /**
758add1155SRico Sonntag     * Create a chart showing where events occurred.
768add1155SRico Sonntag     *
778add1155SRico Sonntag     * @param string $chart_shows
788add1155SRico Sonntag     * @param string $chart_type
798add1155SRico Sonntag     * @param string $surname
808add1155SRico Sonntag     *
818add1155SRico Sonntag     * @return string
828add1155SRico Sonntag     */
838add1155SRico Sonntag    public function chartDistribution(
848add1155SRico Sonntag        string $chart_shows = 'world',
858add1155SRico Sonntag        string $chart_type  = '',
868add1155SRico Sonntag        string $surname     = ''
878add1155SRico Sonntag    ) : string;
888add1155SRico Sonntag}
89