19219296aSGreg Roach<?php 23976b470SGreg Roach 39219296aSGreg Roach/** 49219296aSGreg Roach * webtrees: online genealogy 5d11be702SGreg Roach * Copyright (C) 2023 webtrees development team 69219296aSGreg Roach * This program is free software: you can redistribute it and/or modify 79219296aSGreg Roach * it under the terms of the GNU General Public License as published by 89219296aSGreg Roach * the Free Software Foundation, either version 3 of the License, or 99219296aSGreg Roach * (at your option) any later version. 109219296aSGreg Roach * This program is distributed in the hope that it will be useful, 119219296aSGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of 129219296aSGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 139219296aSGreg Roach * GNU General Public License for more details. 149219296aSGreg Roach * You should have received a copy of the GNU General Public License 1589f7189bSGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>. 169219296aSGreg Roach */ 17fcfa147eSGreg Roach 189219296aSGreg Roachdeclare(strict_types=1); 199219296aSGreg Roach 209219296aSGreg Roachnamespace Fisharebest\Webtrees; 219219296aSGreg Roach 229219296aSGreg Roachuse Fisharebest\Webtrees\Module\ModuleBlockInterface; 239219296aSGreg Roachuse Fisharebest\Webtrees\Module\ModuleInterface; 249219296aSGreg Roachuse Fisharebest\Webtrees\Services\ModuleService; 25e5a6b4d4SGreg Roachuse Fisharebest\Webtrees\Services\UserService; 269219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\BrowserRepository; 279219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\ContactRepository; 289219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\EventRepository; 299219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FamilyDatesRepository; 309219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FamilyRepository; 319219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\FavoritesRepository; 329219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\GedcomRepository; 339219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\HitCountRepository; 349219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\IndividualRepository; 359219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\BrowserRepositoryInterface; 369219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\ContactRepositoryInterface; 379219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\EventRepositoryInterface; 389219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\FamilyDatesRepositoryInterface; 399219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\FavoritesRepositoryInterface; 409219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\GedcomRepositoryInterface; 419219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\HitCountRepositoryInterface; 429219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\IndividualRepositoryInterface; 439219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\LatestUserRepositoryInterface; 449219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\MediaRepositoryInterface; 459219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\MessageRepositoryInterface; 469219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\NewsRepositoryInterface; 479219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\PlaceRepositoryInterface; 489219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\ServerRepositoryInterface; 499219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\Interfaces\UserRepositoryInterface; 509219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\LatestUserRepository; 519219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\MediaRepository; 529219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\MessageRepository; 539219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\NewsRepository; 549219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\PlaceRepository; 559219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\ServerRepository; 569219296aSGreg Roachuse Fisharebest\Webtrees\Statistics\Repository\UserRepository; 57f78da678SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\CenturyService; 58f78da678SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\ColorService; 594c78e066SGreg Roachuse Fisharebest\Webtrees\Statistics\Service\CountryService; 60e6f3d5e2SGreg Roachuse Illuminate\Database\Query\Builder; 61f021177cSGreg Roachuse Illuminate\Support\Collection; 62f021177cSGreg Roachuse ReflectionClass; 63f021177cSGreg Roachuse ReflectionException; 649219296aSGreg Roachuse ReflectionMethod; 656dd2d083SGreg Roachuse ReflectionNamedType; 6676d39c55SGreg Roachuse stdClass; 679219296aSGreg Roach 6871378461SGreg Roachuse function count; 6971378461SGreg Roachuse function in_array; 70dec352c1SGreg Roachuse function str_contains; 7171378461SGreg Roach 729219296aSGreg Roach/** 739219296aSGreg Roach * A selection of pre-formatted statistical queries. 749219296aSGreg Roach * These are primarily used for embedded keywords on HTML blocks, but 759219296aSGreg Roach * are also used elsewhere in the code. 769219296aSGreg Roach */ 779219296aSGreg Roachclass Statistics implements 789219296aSGreg Roach GedcomRepositoryInterface, 799219296aSGreg Roach IndividualRepositoryInterface, 809219296aSGreg Roach EventRepositoryInterface, 819219296aSGreg Roach MediaRepositoryInterface, 829219296aSGreg Roach UserRepositoryInterface, 839219296aSGreg Roach ServerRepositoryInterface, 849219296aSGreg Roach BrowserRepositoryInterface, 859219296aSGreg Roach HitCountRepositoryInterface, 869219296aSGreg Roach LatestUserRepositoryInterface, 879219296aSGreg Roach FavoritesRepositoryInterface, 889219296aSGreg Roach NewsRepositoryInterface, 899219296aSGreg Roach MessageRepositoryInterface, 909219296aSGreg Roach ContactRepositoryInterface, 919219296aSGreg Roach FamilyDatesRepositoryInterface, 929219296aSGreg Roach PlaceRepositoryInterface 939219296aSGreg Roach{ 9443f2f523SGreg Roach private Tree $tree; 959219296aSGreg Roach 9643f2f523SGreg Roach private GedcomRepository $gedcom_repository; 979219296aSGreg Roach 9843f2f523SGreg Roach private IndividualRepository $individual_repository; 999219296aSGreg Roach 10043f2f523SGreg Roach private FamilyRepository $family_repository; 1019219296aSGreg Roach 10243f2f523SGreg Roach private MediaRepository $media_repository; 1039219296aSGreg Roach 10443f2f523SGreg Roach private EventRepository $event_repository; 1059219296aSGreg Roach 10643f2f523SGreg Roach private UserRepository $user_repository; 1079219296aSGreg Roach 10843f2f523SGreg Roach private ServerRepository $server_repository; 1099219296aSGreg Roach 11043f2f523SGreg Roach private BrowserRepository $browser_repository; 1119219296aSGreg Roach 11243f2f523SGreg Roach private HitCountRepository $hit_count_repository; 1139219296aSGreg Roach 11443f2f523SGreg Roach private LatestUserRepository $latest_user_repository; 1159219296aSGreg Roach 11643f2f523SGreg Roach private FavoritesRepository $favorites_repository; 1179219296aSGreg Roach 11843f2f523SGreg Roach private NewsRepository $news_repository; 1199219296aSGreg Roach 12043f2f523SGreg Roach private MessageRepository $message_repository; 1219219296aSGreg Roach 12243f2f523SGreg Roach private ContactRepository $contact_repository; 1239219296aSGreg Roach 12443f2f523SGreg Roach private FamilyDatesRepository $family_dates_repository; 1259219296aSGreg Roach 12643f2f523SGreg Roach private PlaceRepository $place_repository; 12743f2f523SGreg Roach 12843f2f523SGreg Roach private ModuleService $module_service; 1299219296aSGreg Roach 1309219296aSGreg Roach /** 1319219296aSGreg Roach * Create the statistics for a tree. 1329219296aSGreg Roach * 133f78da678SGreg Roach * @param CenturyService $century_service 134f78da678SGreg Roach * @param ColorService $color_service 1354c78e066SGreg Roach * @param CountryService $country_service 1369219296aSGreg Roach * @param ModuleService $module_service 1379219296aSGreg Roach * @param Tree $tree Generate statistics for this tree 138e5a6b4d4SGreg Roach * @param UserService $user_service 1399219296aSGreg Roach */ 1409219296aSGreg Roach public function __construct( 141f78da678SGreg Roach CenturyService $century_service, 142f78da678SGreg Roach ColorService $color_service, 1434c78e066SGreg Roach CountryService $country_service, 1449219296aSGreg Roach ModuleService $module_service, 145e5a6b4d4SGreg Roach Tree $tree, 146e5a6b4d4SGreg Roach UserService $user_service 14798afcacfSGreg Roach ) { 1489219296aSGreg Roach $this->tree = $tree; 149f78da678SGreg Roach $this->gedcom_repository = new GedcomRepository($tree); 150f78da678SGreg Roach $this->individual_repository = new IndividualRepository($century_service, $color_service, $tree); 151f78da678SGreg Roach $this->family_repository = new FamilyRepository($century_service, $color_service, $tree); 152f78da678SGreg Roach $this->family_dates_repository = new FamilyDatesRepository($tree); 153f78da678SGreg Roach $this->media_repository = new MediaRepository($color_service, $tree); 154f78da678SGreg Roach $this->event_repository = new EventRepository($tree); 155f78da678SGreg Roach $this->user_repository = new UserRepository($tree, $user_service); 156f78da678SGreg Roach $this->server_repository = new ServerRepository(); 157f78da678SGreg Roach $this->browser_repository = new BrowserRepository(); 158f78da678SGreg Roach $this->hit_count_repository = new HitCountRepository($tree, $user_service); 159f78da678SGreg Roach $this->latest_user_repository = new LatestUserRepository($user_service); 160f78da678SGreg Roach $this->favorites_repository = new FavoritesRepository($tree, $module_service); 161f78da678SGreg Roach $this->news_repository = new NewsRepository($tree); 162f78da678SGreg Roach $this->message_repository = new MessageRepository(); 163f78da678SGreg Roach $this->contact_repository = new ContactRepository($tree, $user_service); 164f78da678SGreg Roach $this->place_repository = new PlaceRepository($tree, $country_service, $this->individual_repository); 1659219296aSGreg Roach $this->module_service = $module_service; 1669219296aSGreg Roach } 1679219296aSGreg Roach 1689219296aSGreg Roach /** 1699219296aSGreg Roach * Return a string of all supported tags and an example of its output in table row form. 1709219296aSGreg Roach * 1719219296aSGreg Roach * @return string 1729219296aSGreg Roach */ 1739219296aSGreg Roach public function getAllTagsTable(): string 1749219296aSGreg Roach { 175f021177cSGreg Roach try { 176f021177cSGreg Roach $class = new ReflectionClass($this); 1779219296aSGreg Roach 178f021177cSGreg Roach $public_methods = $class->getMethods(ReflectionMethod::IS_PUBLIC); 179f021177cSGreg Roach 180f021177cSGreg Roach $examples = Collection::make($public_methods) 181f25fc0f9SGreg Roach ->filter(static fn(ReflectionMethod $method): bool => !in_array($method->getName(), ['embedTags', 'getAllTagsTable'], true)) 182f021177cSGreg Roach ->filter(static function (ReflectionMethod $method): bool { 183f021177cSGreg Roach $type = $method->getReturnType(); 184f021177cSGreg Roach 1856dd2d083SGreg Roach return $type instanceof ReflectionNamedType && $type->getName() === 'string'; 186f021177cSGreg Roach }) 187f25fc0f9SGreg Roach ->sort(static fn(ReflectionMethod $x, ReflectionMethod $y): int => $x->getName() <=> $y->getName()) 188f021177cSGreg Roach ->map(function (ReflectionMethod $method): string { 189f021177cSGreg Roach $tag = $method->getName(); 190f021177cSGreg Roach 19176d39c55SGreg Roach return '<dt>#' . $tag . '#</dt><dd>' . $this->$tag() . '</dd>'; 192f021177cSGreg Roach }); 193f021177cSGreg Roach 194f021177cSGreg Roach return '<dl>' . $examples->implode('') . '</dl>'; 195f021177cSGreg Roach } catch (ReflectionException $ex) { 196f021177cSGreg Roach return $ex->getMessage(); 1979219296aSGreg Roach } 1989219296aSGreg Roach } 1999219296aSGreg Roach 2009219296aSGreg Roach /** 2019219296aSGreg Roach * Embed tags in text 2029219296aSGreg Roach * 2039219296aSGreg Roach * @param string $text 2049219296aSGreg Roach * 2059219296aSGreg Roach * @return string 2069219296aSGreg Roach */ 2079219296aSGreg Roach public function embedTags(string $text): string 2089219296aSGreg Roach { 209dec352c1SGreg Roach if (str_contains($text, '#')) { 2109219296aSGreg Roach $text = strtr($text, $this->getTags($text)); 2119219296aSGreg Roach } 2129219296aSGreg Roach 2139219296aSGreg Roach return $text; 2149219296aSGreg Roach } 2159219296aSGreg Roach 2169219296aSGreg Roach /** 2170dcd9387SGreg Roach * @return string 2189219296aSGreg Roach */ 2199219296aSGreg Roach public function gedcomFilename(): string 2209219296aSGreg Roach { 221f78da678SGreg Roach return $this->gedcom_repository->gedcomFilename(); 2229219296aSGreg Roach } 2239219296aSGreg Roach 2249219296aSGreg Roach /** 2250dcd9387SGreg Roach * @return int 2269219296aSGreg Roach */ 2279219296aSGreg Roach public function gedcomId(): int 2289219296aSGreg Roach { 229f78da678SGreg Roach return $this->gedcom_repository->gedcomId(); 2309219296aSGreg Roach } 2319219296aSGreg Roach 2329219296aSGreg Roach /** 2330dcd9387SGreg Roach * @return string 2349219296aSGreg Roach */ 2359219296aSGreg Roach public function gedcomTitle(): string 2369219296aSGreg Roach { 237f78da678SGreg Roach return $this->gedcom_repository->gedcomTitle(); 2389219296aSGreg Roach } 2399219296aSGreg Roach 2409219296aSGreg Roach /** 2410dcd9387SGreg Roach * @return string 2429219296aSGreg Roach */ 2439219296aSGreg Roach public function gedcomCreatedSoftware(): string 2449219296aSGreg Roach { 245f78da678SGreg Roach return $this->gedcom_repository->gedcomCreatedSoftware(); 2469219296aSGreg Roach } 2479219296aSGreg Roach 2489219296aSGreg Roach /** 2490dcd9387SGreg Roach * @return string 2509219296aSGreg Roach */ 2519219296aSGreg Roach public function gedcomCreatedVersion(): string 2529219296aSGreg Roach { 253f78da678SGreg Roach return $this->gedcom_repository->gedcomCreatedVersion(); 2549219296aSGreg Roach } 2559219296aSGreg Roach 2569219296aSGreg Roach /** 2570dcd9387SGreg Roach * @return string 2589219296aSGreg Roach */ 2599219296aSGreg Roach public function gedcomDate(): string 2609219296aSGreg Roach { 261f78da678SGreg Roach return $this->gedcom_repository->gedcomDate(); 2629219296aSGreg Roach } 2639219296aSGreg Roach 2649219296aSGreg Roach /** 2650dcd9387SGreg Roach * @return string 2669219296aSGreg Roach */ 2679219296aSGreg Roach public function gedcomUpdated(): string 2689219296aSGreg Roach { 269f78da678SGreg Roach return $this->gedcom_repository->gedcomUpdated(); 2709219296aSGreg Roach } 2719219296aSGreg Roach 2729219296aSGreg Roach /** 2730dcd9387SGreg Roach * @return string 2749219296aSGreg Roach */ 2759219296aSGreg Roach public function gedcomRootId(): string 2769219296aSGreg Roach { 277f78da678SGreg Roach return $this->gedcom_repository->gedcomRootId(); 2789219296aSGreg Roach } 2799219296aSGreg Roach 2809219296aSGreg Roach /** 2810dcd9387SGreg Roach * @return string 2829219296aSGreg Roach */ 2839219296aSGreg Roach public function totalRecords(): string 2849219296aSGreg Roach { 285f78da678SGreg Roach return $this->individual_repository->totalRecords(); 2869219296aSGreg Roach } 2879219296aSGreg Roach 2889219296aSGreg Roach /** 2890dcd9387SGreg Roach * @return string 2909219296aSGreg Roach */ 2919219296aSGreg Roach public function totalIndividuals(): string 2929219296aSGreg Roach { 293f78da678SGreg Roach return $this->individual_repository->totalIndividuals(); 2949219296aSGreg Roach } 2959219296aSGreg Roach 2969219296aSGreg Roach /** 2970dcd9387SGreg Roach * @return string 2989219296aSGreg Roach */ 2999219296aSGreg Roach public function totalIndisWithSources(): string 3009219296aSGreg Roach { 301f78da678SGreg Roach return $this->individual_repository->totalIndisWithSources(); 3029219296aSGreg Roach } 3039219296aSGreg Roach 3049219296aSGreg Roach /** 305baa78b21STheDutchJewel * @return string 306baa78b21STheDutchJewel */ 307baa78b21STheDutchJewel public function totalIndisWithSourcesPercentage(): string 308baa78b21STheDutchJewel { 309baa78b21STheDutchJewel return $this->individual_repository->totalIndisWithSourcesPercentage(); 310baa78b21STheDutchJewel } 311baa78b21STheDutchJewel 312baa78b21STheDutchJewel /** 3130dcd9387SGreg Roach * @param string|null $color_from 3140dcd9387SGreg Roach * @param string|null $color_to 3150dcd9387SGreg Roach * 3160dcd9387SGreg Roach * @return string 3179219296aSGreg Roach */ 3189219296aSGreg Roach public function chartIndisWithSources( 3192c6f1bd5SGreg Roach string|null $color_from = null, 3209219296aSGreg Roach string $color_to = null 32198afcacfSGreg Roach ): string { 322f78da678SGreg Roach return $this->individual_repository->chartIndisWithSources($color_from, $color_to); 3239219296aSGreg Roach } 3249219296aSGreg Roach 3259219296aSGreg Roach /** 3260dcd9387SGreg Roach * @return string 3279219296aSGreg Roach */ 3289219296aSGreg Roach public function totalIndividualsPercentage(): string 3299219296aSGreg Roach { 330f78da678SGreg Roach return $this->individual_repository->totalIndividualsPercentage(); 3319219296aSGreg Roach } 3329219296aSGreg Roach 3339219296aSGreg Roach /** 3340dcd9387SGreg Roach * @return string 3359219296aSGreg Roach */ 3369219296aSGreg Roach public function totalFamilies(): string 3379219296aSGreg Roach { 338f78da678SGreg Roach return $this->individual_repository->totalFamilies(); 3399219296aSGreg Roach } 3409219296aSGreg Roach 3419219296aSGreg Roach /** 3420dcd9387SGreg Roach * @return string 3439219296aSGreg Roach */ 3449219296aSGreg Roach public function totalFamiliesPercentage(): string 3459219296aSGreg Roach { 346f78da678SGreg Roach return $this->individual_repository->totalFamiliesPercentage(); 3479219296aSGreg Roach } 3489219296aSGreg Roach 3499219296aSGreg Roach /** 3500dcd9387SGreg Roach * @return string 3519219296aSGreg Roach */ 3529219296aSGreg Roach public function totalFamsWithSources(): string 3539219296aSGreg Roach { 354f78da678SGreg Roach return $this->individual_repository->totalFamsWithSources(); 3559219296aSGreg Roach } 3569219296aSGreg Roach 3579219296aSGreg Roach /** 358baa78b21STheDutchJewel * @return string 359baa78b21STheDutchJewel */ 360baa78b21STheDutchJewel public function totalFamsWithSourcesPercentage(): string 361baa78b21STheDutchJewel { 362baa78b21STheDutchJewel return $this->individual_repository->totalFamsWithSourcesPercentage(); 363baa78b21STheDutchJewel } 364baa78b21STheDutchJewel 365baa78b21STheDutchJewel /** 3660dcd9387SGreg Roach * @param string|null $color_from 3670dcd9387SGreg Roach * @param string|null $color_to 3680dcd9387SGreg Roach * 3690dcd9387SGreg Roach * @return string 3709219296aSGreg Roach */ 3719219296aSGreg Roach public function chartFamsWithSources( 3722c6f1bd5SGreg Roach string|null $color_from = null, 3739219296aSGreg Roach string $color_to = null 37498afcacfSGreg Roach ): string { 375f78da678SGreg Roach return $this->individual_repository->chartFamsWithSources($color_from, $color_to); 3769219296aSGreg Roach } 3779219296aSGreg Roach 3789219296aSGreg Roach /** 3790dcd9387SGreg Roach * @return string 3809219296aSGreg Roach */ 3819219296aSGreg Roach public function totalSources(): string 3829219296aSGreg Roach { 383f78da678SGreg Roach return $this->individual_repository->totalSources(); 3849219296aSGreg Roach } 3859219296aSGreg Roach 3869219296aSGreg Roach /** 3870dcd9387SGreg Roach * @return string 3889219296aSGreg Roach */ 3899219296aSGreg Roach public function totalSourcesPercentage(): string 3909219296aSGreg Roach { 391f78da678SGreg Roach return $this->individual_repository->totalSourcesPercentage(); 3929219296aSGreg Roach } 3939219296aSGreg Roach 3949219296aSGreg Roach /** 3950dcd9387SGreg Roach * @return string 3969219296aSGreg Roach */ 3979219296aSGreg Roach public function totalNotes(): string 3989219296aSGreg Roach { 399f78da678SGreg Roach return $this->individual_repository->totalNotes(); 4009219296aSGreg Roach } 4019219296aSGreg Roach 4029219296aSGreg Roach /** 4030dcd9387SGreg Roach * @return string 4049219296aSGreg Roach */ 4059219296aSGreg Roach public function totalNotesPercentage(): string 4069219296aSGreg Roach { 407f78da678SGreg Roach return $this->individual_repository->totalNotesPercentage(); 4089219296aSGreg Roach } 4099219296aSGreg Roach 4109219296aSGreg Roach /** 4110dcd9387SGreg Roach * @return string 4129219296aSGreg Roach */ 4139219296aSGreg Roach public function totalRepositories(): string 4149219296aSGreg Roach { 415f78da678SGreg Roach return $this->individual_repository->totalRepositories(); 4169219296aSGreg Roach } 4179219296aSGreg Roach 4189219296aSGreg Roach /** 4190dcd9387SGreg Roach * @return string 4209219296aSGreg Roach */ 4219219296aSGreg Roach public function totalRepositoriesPercentage(): string 4229219296aSGreg Roach { 423f78da678SGreg Roach return $this->individual_repository->totalRepositoriesPercentage(); 4249219296aSGreg Roach } 4259219296aSGreg Roach 4269219296aSGreg Roach /** 42709482a55SGreg Roach * @param array<string> ...$params 428320f6a24SGreg Roach * 429320f6a24SGreg Roach * @return string 4309219296aSGreg Roach */ 4319219296aSGreg Roach public function totalSurnames(...$params): string 4329219296aSGreg Roach { 433f78da678SGreg Roach return $this->individual_repository->totalSurnames(...$params); 4349219296aSGreg Roach } 4359219296aSGreg Roach 4369219296aSGreg Roach /** 43709482a55SGreg Roach * @param array<string> ...$params 438320f6a24SGreg Roach * 439320f6a24SGreg Roach * @return string 4409219296aSGreg Roach */ 4419219296aSGreg Roach public function totalGivennames(...$params): string 4429219296aSGreg Roach { 443f78da678SGreg Roach return $this->individual_repository->totalGivennames(...$params); 4449219296aSGreg Roach } 4459219296aSGreg Roach 4469219296aSGreg Roach /** 44709482a55SGreg Roach * @param array<string> $events 4480dcd9387SGreg Roach * 4490dcd9387SGreg Roach * @return string 4509219296aSGreg Roach */ 4519219296aSGreg Roach public function totalEvents(array $events = []): string 4529219296aSGreg Roach { 453f78da678SGreg Roach return $this->event_repository->totalEvents($events); 4549219296aSGreg Roach } 4559219296aSGreg Roach 4569219296aSGreg Roach /** 4570dcd9387SGreg Roach * @return string 4589219296aSGreg Roach */ 4599219296aSGreg Roach public function totalEventsBirth(): string 4609219296aSGreg Roach { 461f78da678SGreg Roach return $this->event_repository->totalEventsBirth(); 4629219296aSGreg Roach } 4639219296aSGreg Roach 4649219296aSGreg Roach /** 4650dcd9387SGreg Roach * @return string 4669219296aSGreg Roach */ 4679219296aSGreg Roach public function totalBirths(): string 4689219296aSGreg Roach { 469f78da678SGreg Roach return $this->event_repository->totalBirths(); 4709219296aSGreg Roach } 4719219296aSGreg Roach 4729219296aSGreg Roach /** 4730dcd9387SGreg Roach * @return string 4749219296aSGreg Roach */ 4759219296aSGreg Roach public function totalEventsDeath(): string 4769219296aSGreg Roach { 477f78da678SGreg Roach return $this->event_repository->totalEventsDeath(); 4789219296aSGreg Roach } 4799219296aSGreg Roach 4809219296aSGreg Roach /** 4810dcd9387SGreg Roach * @return string 4829219296aSGreg Roach */ 4839219296aSGreg Roach public function totalDeaths(): string 4849219296aSGreg Roach { 485f78da678SGreg Roach return $this->event_repository->totalDeaths(); 4869219296aSGreg Roach } 4879219296aSGreg Roach 4889219296aSGreg Roach /** 4890dcd9387SGreg Roach * @return string 4909219296aSGreg Roach */ 4919219296aSGreg Roach public function totalEventsMarriage(): string 4929219296aSGreg Roach { 493f78da678SGreg Roach return $this->event_repository->totalEventsMarriage(); 4949219296aSGreg Roach } 4959219296aSGreg Roach 4969219296aSGreg Roach /** 4970dcd9387SGreg Roach * @return string 4989219296aSGreg Roach */ 4999219296aSGreg Roach public function totalMarriages(): string 5009219296aSGreg Roach { 501f78da678SGreg Roach return $this->event_repository->totalMarriages(); 5029219296aSGreg Roach } 5039219296aSGreg Roach 5049219296aSGreg Roach /** 5050dcd9387SGreg Roach * @return string 5069219296aSGreg Roach */ 5079219296aSGreg Roach public function totalEventsDivorce(): string 5089219296aSGreg Roach { 509f78da678SGreg Roach return $this->event_repository->totalEventsDivorce(); 5109219296aSGreg Roach } 5119219296aSGreg Roach 5129219296aSGreg Roach /** 5130dcd9387SGreg Roach * @return string 5149219296aSGreg Roach */ 5159219296aSGreg Roach public function totalDivorces(): string 5169219296aSGreg Roach { 517f78da678SGreg Roach return $this->event_repository->totalDivorces(); 5189219296aSGreg Roach } 5199219296aSGreg Roach 5209219296aSGreg Roach /** 5210dcd9387SGreg Roach * @return string 5229219296aSGreg Roach */ 5239219296aSGreg Roach public function totalEventsOther(): string 5249219296aSGreg Roach { 525f78da678SGreg Roach return $this->event_repository->totalEventsOther(); 5269219296aSGreg Roach } 5279219296aSGreg Roach 5289219296aSGreg Roach /** 5290dcd9387SGreg Roach * @return string 5309219296aSGreg Roach */ 5319219296aSGreg Roach public function totalSexMales(): string 5329219296aSGreg Roach { 533f78da678SGreg Roach return $this->individual_repository->totalSexMales(); 5349219296aSGreg Roach } 5359219296aSGreg Roach 5369219296aSGreg Roach /** 5370dcd9387SGreg Roach * @return string 5389219296aSGreg Roach */ 5399219296aSGreg Roach public function totalSexMalesPercentage(): string 5409219296aSGreg Roach { 541f78da678SGreg Roach return $this->individual_repository->totalSexMalesPercentage(); 5429219296aSGreg Roach } 5439219296aSGreg Roach 5449219296aSGreg Roach /** 5450dcd9387SGreg Roach * @return string 5469219296aSGreg Roach */ 5479219296aSGreg Roach public function totalSexFemales(): string 5489219296aSGreg Roach { 549f78da678SGreg Roach return $this->individual_repository->totalSexFemales(); 5509219296aSGreg Roach } 5519219296aSGreg Roach 5529219296aSGreg Roach /** 5530dcd9387SGreg Roach * @return string 5549219296aSGreg Roach */ 5559219296aSGreg Roach public function totalSexFemalesPercentage(): string 5569219296aSGreg Roach { 557f78da678SGreg Roach return $this->individual_repository->totalSexFemalesPercentage(); 5589219296aSGreg Roach } 5599219296aSGreg Roach 5609219296aSGreg Roach /** 5610dcd9387SGreg Roach * @return string 5629219296aSGreg Roach */ 5639219296aSGreg Roach public function totalSexUnknown(): string 5649219296aSGreg Roach { 565f78da678SGreg Roach return $this->individual_repository->totalSexUnknown(); 5669219296aSGreg Roach } 5679219296aSGreg Roach 5689219296aSGreg Roach /** 5690dcd9387SGreg Roach * @return string 5709219296aSGreg Roach */ 5719219296aSGreg Roach public function totalSexUnknownPercentage(): string 5729219296aSGreg Roach { 573f78da678SGreg Roach return $this->individual_repository->totalSexUnknownPercentage(); 5749219296aSGreg Roach } 5759219296aSGreg Roach 5769219296aSGreg Roach /** 5770dcd9387SGreg Roach * @param string|null $color_female 5780dcd9387SGreg Roach * @param string|null $color_male 5790dcd9387SGreg Roach * @param string|null $color_unknown 5800dcd9387SGreg Roach * 5810dcd9387SGreg Roach * @return string 5829219296aSGreg Roach */ 5839219296aSGreg Roach public function chartSex( 5842c6f1bd5SGreg Roach string|null $color_female = null, 5852c6f1bd5SGreg Roach string|null $color_male = null, 5869219296aSGreg Roach string $color_unknown = null 58798afcacfSGreg Roach ): string { 588f78da678SGreg Roach return $this->individual_repository->chartSex($color_female, $color_male, $color_unknown); 5899219296aSGreg Roach } 5909219296aSGreg Roach 5919219296aSGreg Roach /** 5920dcd9387SGreg Roach * @return string 5939219296aSGreg Roach */ 5949219296aSGreg Roach public function totalLiving(): string 5959219296aSGreg Roach { 596f78da678SGreg Roach return $this->individual_repository->totalLiving(); 5979219296aSGreg Roach } 5989219296aSGreg Roach 5999219296aSGreg Roach /** 6000dcd9387SGreg Roach * @return string 6019219296aSGreg Roach */ 6029219296aSGreg Roach public function totalLivingPercentage(): string 6039219296aSGreg Roach { 604f78da678SGreg Roach return $this->individual_repository->totalLivingPercentage(); 6059219296aSGreg Roach } 6069219296aSGreg Roach 6079219296aSGreg Roach /** 6080dcd9387SGreg Roach * @return string 6099219296aSGreg Roach */ 6109219296aSGreg Roach public function totalDeceased(): string 6119219296aSGreg Roach { 612f78da678SGreg Roach return $this->individual_repository->totalDeceased(); 6139219296aSGreg Roach } 6149219296aSGreg Roach 6159219296aSGreg Roach /** 6160dcd9387SGreg Roach * @return string 6179219296aSGreg Roach */ 6189219296aSGreg Roach public function totalDeceasedPercentage(): string 6199219296aSGreg Roach { 620f78da678SGreg Roach return $this->individual_repository->totalDeceasedPercentage(); 6219219296aSGreg Roach } 6229219296aSGreg Roach 6239219296aSGreg Roach /** 6240dcd9387SGreg Roach * @param string|null $color_living 6250dcd9387SGreg Roach * @param string|null $color_dead 6260dcd9387SGreg Roach * 6270dcd9387SGreg Roach * @return string 6289219296aSGreg Roach */ 6292c6f1bd5SGreg Roach public function chartMortality(string|null $color_living = null, string|null $color_dead = null): string 6309219296aSGreg Roach { 631f78da678SGreg Roach return $this->individual_repository->chartMortality($color_living, $color_dead); 6329219296aSGreg Roach } 6339219296aSGreg Roach 6349219296aSGreg Roach /** 6350dcd9387SGreg Roach * @return string 6369219296aSGreg Roach */ 6379219296aSGreg Roach public function totalMedia(): string 6389219296aSGreg Roach { 639f78da678SGreg Roach return $this->media_repository->totalMedia(); 6409219296aSGreg Roach } 6419219296aSGreg Roach 6429219296aSGreg Roach /** 6430dcd9387SGreg Roach * @return string 6449219296aSGreg Roach */ 6459219296aSGreg Roach public function totalMediaAudio(): string 6469219296aSGreg Roach { 647f78da678SGreg Roach return $this->media_repository->totalMediaAudio(); 6489219296aSGreg Roach } 6499219296aSGreg Roach 6509219296aSGreg Roach /** 6510dcd9387SGreg Roach * @return string 6529219296aSGreg Roach */ 6539219296aSGreg Roach public function totalMediaBook(): string 6549219296aSGreg Roach { 655f78da678SGreg Roach return $this->media_repository->totalMediaBook(); 6569219296aSGreg Roach } 6579219296aSGreg Roach 6589219296aSGreg Roach /** 6590dcd9387SGreg Roach * @return string 6609219296aSGreg Roach */ 6619219296aSGreg Roach public function totalMediaCard(): string 6629219296aSGreg Roach { 663f78da678SGreg Roach return $this->media_repository->totalMediaCard(); 6649219296aSGreg Roach } 6659219296aSGreg Roach 6669219296aSGreg Roach /** 6670dcd9387SGreg Roach * @return string 6689219296aSGreg Roach */ 6699219296aSGreg Roach public function totalMediaCertificate(): string 6709219296aSGreg Roach { 671f78da678SGreg Roach return $this->media_repository->totalMediaCertificate(); 6729219296aSGreg Roach } 6739219296aSGreg Roach 6749219296aSGreg Roach /** 6750dcd9387SGreg Roach * @return string 6769219296aSGreg Roach */ 6779219296aSGreg Roach public function totalMediaCoatOfArms(): string 6789219296aSGreg Roach { 679f78da678SGreg Roach return $this->media_repository->totalMediaCoatOfArms(); 6809219296aSGreg Roach } 6819219296aSGreg Roach 6829219296aSGreg Roach /** 6830dcd9387SGreg Roach * @return string 6849219296aSGreg Roach */ 6859219296aSGreg Roach public function totalMediaDocument(): string 6869219296aSGreg Roach { 687f78da678SGreg Roach return $this->media_repository->totalMediaDocument(); 6889219296aSGreg Roach } 6899219296aSGreg Roach 6909219296aSGreg Roach /** 6910dcd9387SGreg Roach * @return string 6929219296aSGreg Roach */ 6939219296aSGreg Roach public function totalMediaElectronic(): string 6949219296aSGreg Roach { 695f78da678SGreg Roach return $this->media_repository->totalMediaElectronic(); 6969219296aSGreg Roach } 6979219296aSGreg Roach 6989219296aSGreg Roach /** 6990dcd9387SGreg Roach * @return string 7009219296aSGreg Roach */ 7019219296aSGreg Roach public function totalMediaMagazine(): string 7029219296aSGreg Roach { 703f78da678SGreg Roach return $this->media_repository->totalMediaMagazine(); 7049219296aSGreg Roach } 7059219296aSGreg Roach 7069219296aSGreg Roach /** 7070dcd9387SGreg Roach * @return string 7089219296aSGreg Roach */ 7099219296aSGreg Roach public function totalMediaManuscript(): string 7109219296aSGreg Roach { 711f78da678SGreg Roach return $this->media_repository->totalMediaManuscript(); 7129219296aSGreg Roach } 7139219296aSGreg Roach 7149219296aSGreg Roach /** 7150dcd9387SGreg Roach * @return string 7169219296aSGreg Roach */ 7179219296aSGreg Roach public function totalMediaMap(): string 7189219296aSGreg Roach { 719f78da678SGreg Roach return $this->media_repository->totalMediaMap(); 7209219296aSGreg Roach } 7219219296aSGreg Roach 7229219296aSGreg Roach /** 7230dcd9387SGreg Roach * @return string 7249219296aSGreg Roach */ 7259219296aSGreg Roach public function totalMediaFiche(): string 7269219296aSGreg Roach { 727f78da678SGreg Roach return $this->media_repository->totalMediaFiche(); 7289219296aSGreg Roach } 7299219296aSGreg Roach 7309219296aSGreg Roach /** 7310dcd9387SGreg Roach * @return string 7329219296aSGreg Roach */ 7339219296aSGreg Roach public function totalMediaFilm(): string 7349219296aSGreg Roach { 735f78da678SGreg Roach return $this->media_repository->totalMediaFilm(); 7369219296aSGreg Roach } 7379219296aSGreg Roach 7389219296aSGreg Roach /** 7390dcd9387SGreg Roach * @return string 7409219296aSGreg Roach */ 7419219296aSGreg Roach public function totalMediaNewspaper(): string 7429219296aSGreg Roach { 743f78da678SGreg Roach return $this->media_repository->totalMediaNewspaper(); 7449219296aSGreg Roach } 7459219296aSGreg Roach 7469219296aSGreg Roach /** 7470dcd9387SGreg Roach * @return string 7489219296aSGreg Roach */ 7499219296aSGreg Roach public function totalMediaPainting(): string 7509219296aSGreg Roach { 751f78da678SGreg Roach return $this->media_repository->totalMediaPainting(); 7529219296aSGreg Roach } 7539219296aSGreg Roach 7549219296aSGreg Roach /** 7550dcd9387SGreg Roach * @return string 7569219296aSGreg Roach */ 7579219296aSGreg Roach public function totalMediaPhoto(): string 7589219296aSGreg Roach { 759f78da678SGreg Roach return $this->media_repository->totalMediaPhoto(); 7609219296aSGreg Roach } 7619219296aSGreg Roach 7629219296aSGreg Roach /** 7630dcd9387SGreg Roach * @return string 7649219296aSGreg Roach */ 7659219296aSGreg Roach public function totalMediaTombstone(): string 7669219296aSGreg Roach { 767f78da678SGreg Roach return $this->media_repository->totalMediaTombstone(); 7689219296aSGreg Roach } 7699219296aSGreg Roach 7709219296aSGreg Roach /** 7710dcd9387SGreg Roach * @return string 7729219296aSGreg Roach */ 7739219296aSGreg Roach public function totalMediaVideo(): string 7749219296aSGreg Roach { 775f78da678SGreg Roach return $this->media_repository->totalMediaVideo(); 7769219296aSGreg Roach } 7779219296aSGreg Roach 7789219296aSGreg Roach /** 7790dcd9387SGreg Roach * @return string 7809219296aSGreg Roach */ 7819219296aSGreg Roach public function totalMediaOther(): string 7829219296aSGreg Roach { 783f78da678SGreg Roach return $this->media_repository->totalMediaOther(); 7849219296aSGreg Roach } 7859219296aSGreg Roach 7869219296aSGreg Roach /** 7870dcd9387SGreg Roach * @return string 7889219296aSGreg Roach */ 7899219296aSGreg Roach public function totalMediaUnknown(): string 7909219296aSGreg Roach { 791f78da678SGreg Roach return $this->media_repository->totalMediaUnknown(); 7929219296aSGreg Roach } 7939219296aSGreg Roach 7949219296aSGreg Roach /** 7950dcd9387SGreg Roach * @param string|null $color_from 7960dcd9387SGreg Roach * @param string|null $color_to 7970dcd9387SGreg Roach * 7980dcd9387SGreg Roach * @return string 7999219296aSGreg Roach */ 8002c6f1bd5SGreg Roach public function chartMedia(string|null $color_from = null, string|null $color_to = null): string 8019219296aSGreg Roach { 802f78da678SGreg Roach return $this->media_repository->chartMedia($color_from, $color_to); 8039219296aSGreg Roach } 8049219296aSGreg Roach 8059219296aSGreg Roach /** 8060dcd9387SGreg Roach * @return string 8079219296aSGreg Roach */ 8089219296aSGreg Roach public function totalPlaces(): string 8099219296aSGreg Roach { 810f78da678SGreg Roach return $this->place_repository->totalPlaces(); 8119219296aSGreg Roach } 8129219296aSGreg Roach 8139219296aSGreg Roach /** 8140dcd9387SGreg Roach * @param string $chart_shows 8150dcd9387SGreg Roach * @param string $chart_type 8160dcd9387SGreg Roach * @param string $surname 8170dcd9387SGreg Roach * 8180dcd9387SGreg Roach * @return string 8199219296aSGreg Roach */ 8209219296aSGreg Roach public function chartDistribution( 8219219296aSGreg Roach string $chart_shows = 'world', 8229219296aSGreg Roach string $chart_type = '', 8239219296aSGreg Roach string $surname = '' 82498afcacfSGreg Roach ): string { 825f78da678SGreg Roach return $this->place_repository->chartDistribution($chart_shows, $chart_type, $surname); 8269219296aSGreg Roach } 8279219296aSGreg Roach 8289219296aSGreg Roach /** 8290dcd9387SGreg Roach * @return string 8309219296aSGreg Roach */ 8319219296aSGreg Roach public function commonCountriesList(): string 8329219296aSGreg Roach { 833f78da678SGreg Roach return $this->place_repository->commonCountriesList(); 8349219296aSGreg Roach } 8359219296aSGreg Roach 8369219296aSGreg Roach /** 8370dcd9387SGreg Roach * @return string 8389219296aSGreg Roach */ 8399219296aSGreg Roach public function commonBirthPlacesList(): string 8409219296aSGreg Roach { 841f78da678SGreg Roach return $this->place_repository->commonBirthPlacesList(); 8429219296aSGreg Roach } 8439219296aSGreg Roach 8449219296aSGreg Roach /** 8450dcd9387SGreg Roach * @return string 8469219296aSGreg Roach */ 8479219296aSGreg Roach public function commonDeathPlacesList(): string 8489219296aSGreg Roach { 849f78da678SGreg Roach return $this->place_repository->commonDeathPlacesList(); 8509219296aSGreg Roach } 8519219296aSGreg Roach 8529219296aSGreg Roach /** 8530dcd9387SGreg Roach * @return string 8549219296aSGreg Roach */ 8559219296aSGreg Roach public function commonMarriagePlacesList(): string 8569219296aSGreg Roach { 857f78da678SGreg Roach return $this->place_repository->commonMarriagePlacesList(); 8589219296aSGreg Roach } 8599219296aSGreg Roach 8609219296aSGreg Roach /** 8610dcd9387SGreg Roach * @return string 8629219296aSGreg Roach */ 8639219296aSGreg Roach public function firstBirth(): string 8649219296aSGreg Roach { 865f78da678SGreg Roach return $this->family_dates_repository->firstBirth(); 8669219296aSGreg Roach } 8679219296aSGreg Roach 8689219296aSGreg Roach /** 8690dcd9387SGreg Roach * @return string 8709219296aSGreg Roach */ 8719219296aSGreg Roach public function firstBirthYear(): string 8729219296aSGreg Roach { 873f78da678SGreg Roach return $this->family_dates_repository->firstBirthYear(); 8749219296aSGreg Roach } 8759219296aSGreg Roach 8769219296aSGreg Roach /** 8770dcd9387SGreg Roach * @return string 8789219296aSGreg Roach */ 8799219296aSGreg Roach public function firstBirthName(): string 8809219296aSGreg Roach { 881f78da678SGreg Roach return $this->family_dates_repository->firstBirthName(); 8829219296aSGreg Roach } 8839219296aSGreg Roach 8849219296aSGreg Roach /** 8850dcd9387SGreg Roach * @return string 8869219296aSGreg Roach */ 8879219296aSGreg Roach public function firstBirthPlace(): string 8889219296aSGreg Roach { 889f78da678SGreg Roach return $this->family_dates_repository->firstBirthPlace(); 8909219296aSGreg Roach } 8919219296aSGreg Roach 8929219296aSGreg Roach /** 8930dcd9387SGreg Roach * @return string 8949219296aSGreg Roach */ 8959219296aSGreg Roach public function lastBirth(): string 8969219296aSGreg Roach { 897f78da678SGreg Roach return $this->family_dates_repository->lastBirth(); 8989219296aSGreg Roach } 8999219296aSGreg Roach 9009219296aSGreg Roach /** 9010dcd9387SGreg Roach * @return string 9029219296aSGreg Roach */ 9039219296aSGreg Roach public function lastBirthYear(): string 9049219296aSGreg Roach { 905f78da678SGreg Roach return $this->family_dates_repository->lastBirthYear(); 9069219296aSGreg Roach } 9079219296aSGreg Roach 9089219296aSGreg Roach /** 9090dcd9387SGreg Roach * @return string 9109219296aSGreg Roach */ 9119219296aSGreg Roach public function lastBirthName(): string 9129219296aSGreg Roach { 913f78da678SGreg Roach return $this->family_dates_repository->lastBirthName(); 9149219296aSGreg Roach } 9159219296aSGreg Roach 9169219296aSGreg Roach /** 9170dcd9387SGreg Roach * @return string 9189219296aSGreg Roach */ 9199219296aSGreg Roach public function lastBirthPlace(): string 9209219296aSGreg Roach { 921f78da678SGreg Roach return $this->family_dates_repository->lastBirthPlace(); 9229219296aSGreg Roach } 9239219296aSGreg Roach 9249219296aSGreg Roach /** 9250dcd9387SGreg Roach * @param int $year1 9260dcd9387SGreg Roach * @param int $year2 9270dcd9387SGreg Roach * 9280dcd9387SGreg Roach * @return Builder 9299219296aSGreg Roach */ 930cde1d378SGreg Roach public function statsBirthQuery(int $year1 = -1, int $year2 = -1): Builder 9319219296aSGreg Roach { 932f78da678SGreg Roach return $this->individual_repository->statsBirthQuery($year1, $year2); 933cde1d378SGreg Roach } 934cde1d378SGreg Roach 935cde1d378SGreg Roach /** 9360dcd9387SGreg Roach * @param int $year1 9370dcd9387SGreg Roach * @param int $year2 9380dcd9387SGreg Roach * 9390dcd9387SGreg Roach * @return Builder 940cde1d378SGreg Roach */ 941cde1d378SGreg Roach public function statsBirthBySexQuery(int $year1 = -1, int $year2 = -1): Builder 942cde1d378SGreg Roach { 943f78da678SGreg Roach return $this->individual_repository->statsBirthBySexQuery($year1, $year2); 9449219296aSGreg Roach } 9459219296aSGreg Roach 9469219296aSGreg Roach /** 9470dcd9387SGreg Roach * @param string|null $color_from 9480dcd9387SGreg Roach * @param string|null $color_to 9490dcd9387SGreg Roach * 9500dcd9387SGreg Roach * @return string 9519219296aSGreg Roach */ 9522c6f1bd5SGreg Roach public function statsBirth(string|null $color_from = null, string|null $color_to = null): string 9539219296aSGreg Roach { 954f78da678SGreg Roach return $this->individual_repository->statsBirth($color_from, $color_to); 9559219296aSGreg Roach } 9569219296aSGreg Roach 9579219296aSGreg Roach /** 9580dcd9387SGreg Roach * @return string 9599219296aSGreg Roach */ 9609219296aSGreg Roach public function firstDeath(): string 9619219296aSGreg Roach { 962f78da678SGreg Roach return $this->family_dates_repository->firstDeath(); 9639219296aSGreg Roach } 9649219296aSGreg Roach 9659219296aSGreg Roach /** 9660dcd9387SGreg Roach * @return string 9679219296aSGreg Roach */ 9689219296aSGreg Roach public function firstDeathYear(): string 9699219296aSGreg Roach { 970f78da678SGreg Roach return $this->family_dates_repository->firstDeathYear(); 9719219296aSGreg Roach } 9729219296aSGreg Roach 9739219296aSGreg Roach /** 9740dcd9387SGreg Roach * @return string 9759219296aSGreg Roach */ 9769219296aSGreg Roach public function firstDeathName(): string 9779219296aSGreg Roach { 978f78da678SGreg Roach return $this->family_dates_repository->firstDeathName(); 9799219296aSGreg Roach } 9809219296aSGreg Roach 9819219296aSGreg Roach /** 9820dcd9387SGreg Roach * @return string 9839219296aSGreg Roach */ 9849219296aSGreg Roach public function firstDeathPlace(): string 9859219296aSGreg Roach { 986f78da678SGreg Roach return $this->family_dates_repository->firstDeathPlace(); 9879219296aSGreg Roach } 9889219296aSGreg Roach 9899219296aSGreg Roach /** 9900dcd9387SGreg Roach * @return string 9919219296aSGreg Roach */ 9929219296aSGreg Roach public function lastDeath(): string 9939219296aSGreg Roach { 994f78da678SGreg Roach return $this->family_dates_repository->lastDeath(); 9959219296aSGreg Roach } 9969219296aSGreg Roach 9979219296aSGreg Roach /** 9980dcd9387SGreg Roach * @return string 9999219296aSGreg Roach */ 10009219296aSGreg Roach public function lastDeathYear(): string 10019219296aSGreg Roach { 1002f78da678SGreg Roach return $this->family_dates_repository->lastDeathYear(); 10039219296aSGreg Roach } 10049219296aSGreg Roach 10059219296aSGreg Roach /** 10060dcd9387SGreg Roach * @return string 10079219296aSGreg Roach */ 10089219296aSGreg Roach public function lastDeathName(): string 10099219296aSGreg Roach { 1010f78da678SGreg Roach return $this->family_dates_repository->lastDeathName(); 10119219296aSGreg Roach } 10129219296aSGreg Roach 10139219296aSGreg Roach /** 10140dcd9387SGreg Roach * @return string 10159219296aSGreg Roach */ 10169219296aSGreg Roach public function lastDeathPlace(): string 10179219296aSGreg Roach { 1018f78da678SGreg Roach return $this->family_dates_repository->lastDeathPlace(); 10199219296aSGreg Roach } 10209219296aSGreg Roach 10219219296aSGreg Roach /** 10220dcd9387SGreg Roach * @param int $year1 10230dcd9387SGreg Roach * @param int $year2 10240dcd9387SGreg Roach * 10250dcd9387SGreg Roach * @return Builder 10269219296aSGreg Roach */ 1027cde1d378SGreg Roach public function statsDeathQuery(int $year1 = -1, int $year2 = -1): Builder 10289219296aSGreg Roach { 1029f78da678SGreg Roach return $this->individual_repository->statsDeathQuery($year1, $year2); 1030cde1d378SGreg Roach } 1031cde1d378SGreg Roach 1032cde1d378SGreg Roach /** 10330dcd9387SGreg Roach * @param int $year1 10340dcd9387SGreg Roach * @param int $year2 10350dcd9387SGreg Roach * 10360dcd9387SGreg Roach * @return Builder 1037cde1d378SGreg Roach */ 1038cde1d378SGreg Roach public function statsDeathBySexQuery(int $year1 = -1, int $year2 = -1): Builder 1039cde1d378SGreg Roach { 1040f78da678SGreg Roach return $this->individual_repository->statsDeathBySexQuery($year1, $year2); 10419219296aSGreg Roach } 10429219296aSGreg Roach 10439219296aSGreg Roach /** 10440dcd9387SGreg Roach * @param string|null $color_from 10450dcd9387SGreg Roach * @param string|null $color_to 10460dcd9387SGreg Roach * 10470dcd9387SGreg Roach * @return string 10489219296aSGreg Roach */ 10492c6f1bd5SGreg Roach public function statsDeath(string|null $color_from = null, string|null $color_to = null): string 10509219296aSGreg Roach { 1051f78da678SGreg Roach return $this->individual_repository->statsDeath($color_from, $color_to); 10529219296aSGreg Roach } 10539219296aSGreg Roach 10549219296aSGreg Roach /** 1055320f6a24SGreg Roach * General query on ages. 1056320f6a24SGreg Roach * 1057320f6a24SGreg Roach * @param string $related 1058320f6a24SGreg Roach * @param string $sex 1059320f6a24SGreg Roach * @param int $year1 1060320f6a24SGreg Roach * @param int $year2 1061320f6a24SGreg Roach * 106276d39c55SGreg Roach * @return array<array<stdClass>> 10639219296aSGreg Roach */ 106476d39c55SGreg Roach public function statsAgeQuery(string $related = 'BIRT', string $sex = 'BOTH', int $year1 = -1, int $year2 = -1): array 10659219296aSGreg Roach { 1066f78da678SGreg Roach return $this->individual_repository->statsAgeQuery($related, $sex, $year1, $year2); 10679219296aSGreg Roach } 10689219296aSGreg Roach 10699219296aSGreg Roach /** 10700dcd9387SGreg Roach * @return string 10719219296aSGreg Roach */ 107288de55fdSRico Sonntag public function statsAge(): string 10739219296aSGreg Roach { 1074f78da678SGreg Roach return $this->individual_repository->statsAge(); 10759219296aSGreg Roach } 10769219296aSGreg Roach 10779219296aSGreg Roach /** 10780dcd9387SGreg Roach * @return string 10799219296aSGreg Roach */ 10809219296aSGreg Roach public function longestLife(): string 10819219296aSGreg Roach { 1082f78da678SGreg Roach return $this->individual_repository->longestLife(); 10839219296aSGreg Roach } 10849219296aSGreg Roach 10859219296aSGreg Roach /** 10860dcd9387SGreg Roach * @return string 10879219296aSGreg Roach */ 10889219296aSGreg Roach public function longestLifeAge(): string 10899219296aSGreg Roach { 1090f78da678SGreg Roach return $this->individual_repository->longestLifeAge(); 10919219296aSGreg Roach } 10929219296aSGreg Roach 10939219296aSGreg Roach /** 10940dcd9387SGreg Roach * @return string 10959219296aSGreg Roach */ 10969219296aSGreg Roach public function longestLifeName(): string 10979219296aSGreg Roach { 1098f78da678SGreg Roach return $this->individual_repository->longestLifeName(); 10999219296aSGreg Roach } 11009219296aSGreg Roach 11019219296aSGreg Roach /** 11020dcd9387SGreg Roach * @return string 11039219296aSGreg Roach */ 11049219296aSGreg Roach public function longestLifeFemale(): string 11059219296aSGreg Roach { 1106f78da678SGreg Roach return $this->individual_repository->longestLifeFemale(); 11079219296aSGreg Roach } 11089219296aSGreg Roach 11099219296aSGreg Roach /** 11100dcd9387SGreg Roach * @return string 11119219296aSGreg Roach */ 11129219296aSGreg Roach public function longestLifeFemaleAge(): string 11139219296aSGreg Roach { 1114f78da678SGreg Roach return $this->individual_repository->longestLifeFemaleAge(); 11159219296aSGreg Roach } 11169219296aSGreg Roach 11179219296aSGreg Roach /** 11180dcd9387SGreg Roach * @return string 11199219296aSGreg Roach */ 11209219296aSGreg Roach public function longestLifeFemaleName(): string 11219219296aSGreg Roach { 1122f78da678SGreg Roach return $this->individual_repository->longestLifeFemaleName(); 11239219296aSGreg Roach } 11249219296aSGreg Roach 11259219296aSGreg Roach /** 11260dcd9387SGreg Roach * @return string 11279219296aSGreg Roach */ 11289219296aSGreg Roach public function longestLifeMale(): string 11299219296aSGreg Roach { 1130f78da678SGreg Roach return $this->individual_repository->longestLifeMale(); 11319219296aSGreg Roach } 11329219296aSGreg Roach 11339219296aSGreg Roach /** 11340dcd9387SGreg Roach * @return string 11359219296aSGreg Roach */ 11369219296aSGreg Roach public function longestLifeMaleAge(): string 11379219296aSGreg Roach { 1138f78da678SGreg Roach return $this->individual_repository->longestLifeMaleAge(); 11399219296aSGreg Roach } 11409219296aSGreg Roach 11419219296aSGreg Roach /** 11420dcd9387SGreg Roach * @return string 11439219296aSGreg Roach */ 11449219296aSGreg Roach public function longestLifeMaleName(): string 11459219296aSGreg Roach { 1146f78da678SGreg Roach return $this->individual_repository->longestLifeMaleName(); 11479219296aSGreg Roach } 11489219296aSGreg Roach 11499219296aSGreg Roach /** 11500dcd9387SGreg Roach * @param string $total 11510dcd9387SGreg Roach * 11520dcd9387SGreg Roach * @return string 11539219296aSGreg Roach */ 11549219296aSGreg Roach public function topTenOldest(string $total = '10'): string 11559219296aSGreg Roach { 1156f78da678SGreg Roach return $this->individual_repository->topTenOldest((int) $total); 11579219296aSGreg Roach } 11589219296aSGreg Roach 11599219296aSGreg Roach /** 11600dcd9387SGreg Roach * @param string $total 11610dcd9387SGreg Roach * 11620dcd9387SGreg Roach * @return string 11639219296aSGreg Roach */ 11649219296aSGreg Roach public function topTenOldestList(string $total = '10'): string 11659219296aSGreg Roach { 1166f78da678SGreg Roach return $this->individual_repository->topTenOldestList((int) $total); 11679219296aSGreg Roach } 11689219296aSGreg Roach 11699219296aSGreg Roach /** 11700dcd9387SGreg Roach * @param string $total 11710dcd9387SGreg Roach * 11720dcd9387SGreg Roach * @return string 11739219296aSGreg Roach */ 11749219296aSGreg Roach public function topTenOldestFemale(string $total = '10'): string 11759219296aSGreg Roach { 1176f78da678SGreg Roach return $this->individual_repository->topTenOldestFemale((int) $total); 11779219296aSGreg Roach } 11789219296aSGreg Roach 11799219296aSGreg Roach /** 11800dcd9387SGreg Roach * @param string $total 11810dcd9387SGreg Roach * 11820dcd9387SGreg Roach * @return string 11839219296aSGreg Roach */ 11849219296aSGreg Roach public function topTenOldestFemaleList(string $total = '10'): string 11859219296aSGreg Roach { 1186f78da678SGreg Roach return $this->individual_repository->topTenOldestFemaleList((int) $total); 11879219296aSGreg Roach } 11889219296aSGreg Roach 11899219296aSGreg Roach /** 11900dcd9387SGreg Roach * @param string $total 11910dcd9387SGreg Roach * 11920dcd9387SGreg Roach * @return string 11939219296aSGreg Roach */ 11949219296aSGreg Roach public function topTenOldestMale(string $total = '10'): string 11959219296aSGreg Roach { 1196f78da678SGreg Roach return $this->individual_repository->topTenOldestMale((int) $total); 11979219296aSGreg Roach } 11989219296aSGreg Roach 11999219296aSGreg Roach /** 12000dcd9387SGreg Roach * @param string $total 12010dcd9387SGreg Roach * 12020dcd9387SGreg Roach * @return string 12039219296aSGreg Roach */ 12049219296aSGreg Roach public function topTenOldestMaleList(string $total = '10'): string 12059219296aSGreg Roach { 1206f78da678SGreg Roach return $this->individual_repository->topTenOldestMaleList((int) $total); 12079219296aSGreg Roach } 12089219296aSGreg Roach 12099219296aSGreg Roach /** 12100dcd9387SGreg Roach * @param string $total 12110dcd9387SGreg Roach * 12120dcd9387SGreg Roach * @return string 12139219296aSGreg Roach */ 12149219296aSGreg Roach public function topTenOldestAlive(string $total = '10'): string 12159219296aSGreg Roach { 1216f78da678SGreg Roach return $this->individual_repository->topTenOldestAlive((int) $total); 12179219296aSGreg Roach } 12189219296aSGreg Roach 12199219296aSGreg Roach /** 12200dcd9387SGreg Roach * @param string $total 12210dcd9387SGreg Roach * 12220dcd9387SGreg Roach * @return string 12239219296aSGreg Roach */ 12249219296aSGreg Roach public function topTenOldestListAlive(string $total = '10'): string 12259219296aSGreg Roach { 1226f78da678SGreg Roach return $this->individual_repository->topTenOldestListAlive((int) $total); 12279219296aSGreg Roach } 12289219296aSGreg Roach 12299219296aSGreg Roach /** 12300dcd9387SGreg Roach * @param string $total 12310dcd9387SGreg Roach * 12320dcd9387SGreg Roach * @return string 12339219296aSGreg Roach */ 12349219296aSGreg Roach public function topTenOldestFemaleAlive(string $total = '10'): string 12359219296aSGreg Roach { 1236f78da678SGreg Roach return $this->individual_repository->topTenOldestFemaleAlive((int) $total); 12379219296aSGreg Roach } 12389219296aSGreg Roach 12399219296aSGreg Roach /** 12400dcd9387SGreg Roach * @param string $total 12410dcd9387SGreg Roach * 12420dcd9387SGreg Roach * @return string 12439219296aSGreg Roach */ 12449219296aSGreg Roach public function topTenOldestFemaleListAlive(string $total = '10'): string 12459219296aSGreg Roach { 1246f78da678SGreg Roach return $this->individual_repository->topTenOldestFemaleListAlive((int) $total); 12479219296aSGreg Roach } 12489219296aSGreg Roach 12499219296aSGreg Roach /** 12500dcd9387SGreg Roach * @param string $total 12510dcd9387SGreg Roach * 12520dcd9387SGreg Roach * @return string 12539219296aSGreg Roach */ 12549219296aSGreg Roach public function topTenOldestMaleAlive(string $total = '10'): string 12559219296aSGreg Roach { 1256f78da678SGreg Roach return $this->individual_repository->topTenOldestMaleAlive((int) $total); 12579219296aSGreg Roach } 12589219296aSGreg Roach 12599219296aSGreg Roach /** 12600dcd9387SGreg Roach * @param string $total 12610dcd9387SGreg Roach * 12620dcd9387SGreg Roach * @return string 12639219296aSGreg Roach */ 12649219296aSGreg Roach public function topTenOldestMaleListAlive(string $total = '10'): string 12659219296aSGreg Roach { 1266f78da678SGreg Roach return $this->individual_repository->topTenOldestMaleListAlive((int) $total); 12679219296aSGreg Roach } 12689219296aSGreg Roach 12699219296aSGreg Roach /** 1270bd055353SGreg Roach * @param string $show_years 12710dcd9387SGreg Roach * 12720dcd9387SGreg Roach * @return string 12739219296aSGreg Roach */ 1274bd055353SGreg Roach public function averageLifespan(string $show_years = ''): string 12759219296aSGreg Roach { 1276bd055353SGreg Roach return $this->individual_repository->averageLifespan((bool) $show_years); 12779219296aSGreg Roach } 12789219296aSGreg Roach 12799219296aSGreg Roach /** 1280bd055353SGreg Roach * @param string $show_years 12810dcd9387SGreg Roach * 12820dcd9387SGreg Roach * @return string 12839219296aSGreg Roach */ 1284bd055353SGreg Roach public function averageLifespanFemale(string $show_years = ''): string 12859219296aSGreg Roach { 1286bd055353SGreg Roach return $this->individual_repository->averageLifespanFemale((bool) $show_years); 12879219296aSGreg Roach } 12889219296aSGreg Roach 12899219296aSGreg Roach /** 1290bd055353SGreg Roach * @param string $show_years 12910dcd9387SGreg Roach * 12920dcd9387SGreg Roach * @return string 12939219296aSGreg Roach */ 1294bd055353SGreg Roach public function averageLifespanMale(string $show_years = ''): string 12959219296aSGreg Roach { 1296bd055353SGreg Roach return $this->individual_repository->averageLifespanMale((bool) $show_years); 12979219296aSGreg Roach } 12989219296aSGreg Roach 12999219296aSGreg Roach /** 13000dcd9387SGreg Roach * @return string 13019219296aSGreg Roach */ 13029219296aSGreg Roach public function firstEvent(): string 13039219296aSGreg Roach { 1304f78da678SGreg Roach return $this->event_repository->firstEvent(); 13059219296aSGreg Roach } 13069219296aSGreg Roach 13079219296aSGreg Roach /** 13080dcd9387SGreg Roach * @return string 13099219296aSGreg Roach */ 13109219296aSGreg Roach public function firstEventYear(): string 13119219296aSGreg Roach { 1312f78da678SGreg Roach return $this->event_repository->firstEventYear(); 13139219296aSGreg Roach } 13149219296aSGreg Roach 13159219296aSGreg Roach /** 13160dcd9387SGreg Roach * @return string 13179219296aSGreg Roach */ 13189219296aSGreg Roach public function firstEventType(): string 13199219296aSGreg Roach { 1320f78da678SGreg Roach return $this->event_repository->firstEventType(); 13219219296aSGreg Roach } 13229219296aSGreg Roach 13239219296aSGreg Roach /** 13240dcd9387SGreg Roach * @return string 13259219296aSGreg Roach */ 13269219296aSGreg Roach public function firstEventName(): string 13279219296aSGreg Roach { 1328f78da678SGreg Roach return $this->event_repository->firstEventName(); 13299219296aSGreg Roach } 13309219296aSGreg Roach 13319219296aSGreg Roach /** 13320dcd9387SGreg Roach * @return string 13339219296aSGreg Roach */ 13349219296aSGreg Roach public function firstEventPlace(): string 13359219296aSGreg Roach { 1336f78da678SGreg Roach return $this->event_repository->firstEventPlace(); 13379219296aSGreg Roach } 13389219296aSGreg Roach 13399219296aSGreg Roach /** 13400dcd9387SGreg Roach * @return string 13419219296aSGreg Roach */ 13429219296aSGreg Roach public function lastEvent(): string 13439219296aSGreg Roach { 1344f78da678SGreg Roach return $this->event_repository->lastEvent(); 13459219296aSGreg Roach } 13469219296aSGreg Roach 13479219296aSGreg Roach /** 13480dcd9387SGreg Roach * @return string 13499219296aSGreg Roach */ 13509219296aSGreg Roach public function lastEventYear(): string 13519219296aSGreg Roach { 1352f78da678SGreg Roach return $this->event_repository->lastEventYear(); 13539219296aSGreg Roach } 13549219296aSGreg Roach 13559219296aSGreg Roach /** 13560dcd9387SGreg Roach * @return string 13579219296aSGreg Roach */ 13589219296aSGreg Roach public function lastEventType(): string 13599219296aSGreg Roach { 1360f78da678SGreg Roach return $this->event_repository->lastEventType(); 13619219296aSGreg Roach } 13629219296aSGreg Roach 13639219296aSGreg Roach /** 13640dcd9387SGreg Roach * @return string 13659219296aSGreg Roach */ 13669219296aSGreg Roach public function lastEventName(): string 13679219296aSGreg Roach { 1368f78da678SGreg Roach return $this->event_repository->lastEventName(); 13699219296aSGreg Roach } 13709219296aSGreg Roach 13719219296aSGreg Roach /** 13720dcd9387SGreg Roach * @return string 13739219296aSGreg Roach */ 13749219296aSGreg Roach public function lastEventPlace(): string 13759219296aSGreg Roach { 13763107fd63SGreg Roach return $this->event_repository->lastEventPlace(); 13779219296aSGreg Roach } 13789219296aSGreg Roach 13799219296aSGreg Roach /** 13800dcd9387SGreg Roach * @return string 13819219296aSGreg Roach */ 13829219296aSGreg Roach public function firstMarriage(): string 13839219296aSGreg Roach { 1384f78da678SGreg Roach return $this->family_dates_repository->firstMarriage(); 13859219296aSGreg Roach } 13869219296aSGreg Roach 13879219296aSGreg Roach /** 13880dcd9387SGreg Roach * @return string 13899219296aSGreg Roach */ 13909219296aSGreg Roach public function firstMarriageYear(): string 13919219296aSGreg Roach { 1392f78da678SGreg Roach return $this->family_dates_repository->firstMarriageYear(); 13939219296aSGreg Roach } 13949219296aSGreg Roach 13959219296aSGreg Roach /** 13960dcd9387SGreg Roach * @return string 13979219296aSGreg Roach */ 13989219296aSGreg Roach public function firstMarriageName(): string 13999219296aSGreg Roach { 1400f78da678SGreg Roach return $this->family_dates_repository->firstMarriageName(); 14019219296aSGreg Roach } 14029219296aSGreg Roach 14039219296aSGreg Roach /** 14040dcd9387SGreg Roach * @return string 14059219296aSGreg Roach */ 14069219296aSGreg Roach public function firstMarriagePlace(): string 14079219296aSGreg Roach { 1408f78da678SGreg Roach return $this->family_dates_repository->firstMarriagePlace(); 14099219296aSGreg Roach } 14109219296aSGreg Roach 14119219296aSGreg Roach /** 14120dcd9387SGreg Roach * @return string 14139219296aSGreg Roach */ 14149219296aSGreg Roach public function lastMarriage(): string 14159219296aSGreg Roach { 1416f78da678SGreg Roach return $this->family_dates_repository->lastMarriage(); 14179219296aSGreg Roach } 14189219296aSGreg Roach 14199219296aSGreg Roach /** 14200dcd9387SGreg Roach * @return string 14219219296aSGreg Roach */ 14229219296aSGreg Roach public function lastMarriageYear(): string 14239219296aSGreg Roach { 1424f78da678SGreg Roach return $this->family_dates_repository->lastMarriageYear(); 14259219296aSGreg Roach } 14269219296aSGreg Roach 14279219296aSGreg Roach /** 14280dcd9387SGreg Roach * @return string 14299219296aSGreg Roach */ 14309219296aSGreg Roach public function lastMarriageName(): string 14319219296aSGreg Roach { 1432f78da678SGreg Roach return $this->family_dates_repository->lastMarriageName(); 14339219296aSGreg Roach } 14349219296aSGreg Roach 14359219296aSGreg Roach /** 14360dcd9387SGreg Roach * @return string 14379219296aSGreg Roach */ 14389219296aSGreg Roach public function lastMarriagePlace(): string 14399219296aSGreg Roach { 1440f78da678SGreg Roach return $this->family_dates_repository->lastMarriagePlace(); 14419219296aSGreg Roach } 14429219296aSGreg Roach 14439219296aSGreg Roach /** 14440dcd9387SGreg Roach * @param int $year1 14450dcd9387SGreg Roach * @param int $year2 14460dcd9387SGreg Roach * 14470dcd9387SGreg Roach * @return Builder 14489219296aSGreg Roach */ 1449e6f3d5e2SGreg Roach public function statsMarriageQuery(int $year1 = -1, int $year2 = -1): Builder 14509219296aSGreg Roach { 1451f78da678SGreg Roach return $this->family_repository->statsMarriageQuery($year1, $year2); 1452e6f3d5e2SGreg Roach } 1453e6f3d5e2SGreg Roach 1454e6f3d5e2SGreg Roach /** 14550dcd9387SGreg Roach * @param int $year1 14560dcd9387SGreg Roach * @param int $year2 14570dcd9387SGreg Roach * 14580dcd9387SGreg Roach * @return Builder 1459e6f3d5e2SGreg Roach */ 1460e6f3d5e2SGreg Roach public function statsFirstMarriageQuery(int $year1 = -1, int $year2 = -1): Builder 1461e6f3d5e2SGreg Roach { 1462f78da678SGreg Roach return $this->family_repository->statsFirstMarriageQuery($year1, $year2); 14639219296aSGreg Roach } 14649219296aSGreg Roach 14659219296aSGreg Roach /** 14660dcd9387SGreg Roach * @param string|null $color_from 14670dcd9387SGreg Roach * @param string|null $color_to 14680dcd9387SGreg Roach * 14690dcd9387SGreg Roach * @return string 14709219296aSGreg Roach */ 14712c6f1bd5SGreg Roach public function statsMarr(string|null $color_from = null, string|null $color_to = null): string 14729219296aSGreg Roach { 1473f78da678SGreg Roach return $this->family_repository->statsMarr($color_from, $color_to); 14749219296aSGreg Roach } 14759219296aSGreg Roach 14769219296aSGreg Roach /** 14770dcd9387SGreg Roach * @return string 14789219296aSGreg Roach */ 14799219296aSGreg Roach public function firstDivorce(): string 14809219296aSGreg Roach { 1481f78da678SGreg Roach return $this->family_dates_repository->firstDivorce(); 14829219296aSGreg Roach } 14839219296aSGreg Roach 14849219296aSGreg Roach /** 14850dcd9387SGreg Roach * @return string 14869219296aSGreg Roach */ 14879219296aSGreg Roach public function firstDivorceYear(): string 14889219296aSGreg Roach { 1489f78da678SGreg Roach return $this->family_dates_repository->firstDivorceYear(); 14909219296aSGreg Roach } 14919219296aSGreg Roach 14929219296aSGreg Roach /** 14930dcd9387SGreg Roach * @return string 14949219296aSGreg Roach */ 14959219296aSGreg Roach public function firstDivorceName(): string 14969219296aSGreg Roach { 1497f78da678SGreg Roach return $this->family_dates_repository->firstDivorceName(); 14989219296aSGreg Roach } 14999219296aSGreg Roach 15009219296aSGreg Roach /** 15010dcd9387SGreg Roach * @return string 15029219296aSGreg Roach */ 15039219296aSGreg Roach public function firstDivorcePlace(): string 15049219296aSGreg Roach { 1505f78da678SGreg Roach return $this->family_dates_repository->firstDivorcePlace(); 15069219296aSGreg Roach } 15079219296aSGreg Roach 15089219296aSGreg Roach /** 15090dcd9387SGreg Roach * @return string 15109219296aSGreg Roach */ 15119219296aSGreg Roach public function lastDivorce(): string 15129219296aSGreg Roach { 1513f78da678SGreg Roach return $this->family_dates_repository->lastDivorce(); 15149219296aSGreg Roach } 15159219296aSGreg Roach 15169219296aSGreg Roach /** 15170dcd9387SGreg Roach * @return string 15189219296aSGreg Roach */ 15199219296aSGreg Roach public function lastDivorceYear(): string 15209219296aSGreg Roach { 1521f78da678SGreg Roach return $this->family_dates_repository->lastDivorceYear(); 15229219296aSGreg Roach } 15239219296aSGreg Roach 15249219296aSGreg Roach /** 15250dcd9387SGreg Roach * @return string 15269219296aSGreg Roach */ 15279219296aSGreg Roach public function lastDivorceName(): string 15289219296aSGreg Roach { 1529f78da678SGreg Roach return $this->family_dates_repository->lastDivorceName(); 15309219296aSGreg Roach } 15319219296aSGreg Roach 15329219296aSGreg Roach /** 15330dcd9387SGreg Roach * @return string 15349219296aSGreg Roach */ 15359219296aSGreg Roach public function lastDivorcePlace(): string 15369219296aSGreg Roach { 1537f78da678SGreg Roach return $this->family_dates_repository->lastDivorcePlace(); 15389219296aSGreg Roach } 15399219296aSGreg Roach 15409219296aSGreg Roach /** 15410dcd9387SGreg Roach * @param string|null $color_from 15420dcd9387SGreg Roach * @param string|null $color_to 15430dcd9387SGreg Roach * 15440dcd9387SGreg Roach * @return string 15459219296aSGreg Roach */ 15462c6f1bd5SGreg Roach public function statsDiv(string|null $color_from = null, string|null $color_to = null): string 15479219296aSGreg Roach { 1548f78da678SGreg Roach return $this->family_repository->statsDiv($color_from, $color_to); 15499219296aSGreg Roach } 15509219296aSGreg Roach 15519219296aSGreg Roach /** 15520dcd9387SGreg Roach * @return string 15539219296aSGreg Roach */ 15549219296aSGreg Roach public function youngestMarriageFemale(): string 15559219296aSGreg Roach { 1556f78da678SGreg Roach return $this->family_repository->youngestMarriageFemale(); 15579219296aSGreg Roach } 15589219296aSGreg Roach 15599219296aSGreg Roach /** 15600dcd9387SGreg Roach * @return string 15619219296aSGreg Roach */ 15629219296aSGreg Roach public function youngestMarriageFemaleName(): string 15639219296aSGreg Roach { 1564f78da678SGreg Roach return $this->family_repository->youngestMarriageFemaleName(); 15659219296aSGreg Roach } 15669219296aSGreg Roach 15679219296aSGreg Roach /** 15680dcd9387SGreg Roach * @param string $show_years 15690dcd9387SGreg Roach * 15700dcd9387SGreg Roach * @return string 15719219296aSGreg Roach */ 15729219296aSGreg Roach public function youngestMarriageFemaleAge(string $show_years = ''): string 15739219296aSGreg Roach { 1574f78da678SGreg Roach return $this->family_repository->youngestMarriageFemaleAge($show_years); 15759219296aSGreg Roach } 15769219296aSGreg Roach 15779219296aSGreg Roach /** 15780dcd9387SGreg Roach * @return string 15799219296aSGreg Roach */ 15809219296aSGreg Roach public function oldestMarriageFemale(): string 15819219296aSGreg Roach { 1582f78da678SGreg Roach return $this->family_repository->oldestMarriageFemale(); 15839219296aSGreg Roach } 15849219296aSGreg Roach 15859219296aSGreg Roach /** 15860dcd9387SGreg Roach * @return string 15879219296aSGreg Roach */ 15889219296aSGreg Roach public function oldestMarriageFemaleName(): string 15899219296aSGreg Roach { 1590f78da678SGreg Roach return $this->family_repository->oldestMarriageFemaleName(); 15919219296aSGreg Roach } 15929219296aSGreg Roach 15939219296aSGreg Roach /** 15940dcd9387SGreg Roach * @param string $show_years 15950dcd9387SGreg Roach * 15960dcd9387SGreg Roach * @return string 15979219296aSGreg Roach */ 15989219296aSGreg Roach public function oldestMarriageFemaleAge(string $show_years = ''): string 15999219296aSGreg Roach { 1600f78da678SGreg Roach return $this->family_repository->oldestMarriageFemaleAge($show_years); 16019219296aSGreg Roach } 16029219296aSGreg Roach 16039219296aSGreg Roach /** 16040dcd9387SGreg Roach * @return string 16059219296aSGreg Roach */ 16069219296aSGreg Roach public function youngestMarriageMale(): string 16079219296aSGreg Roach { 1608f78da678SGreg Roach return $this->family_repository->youngestMarriageMale(); 16099219296aSGreg Roach } 16109219296aSGreg Roach 16119219296aSGreg Roach /** 16120dcd9387SGreg Roach * @return string 16139219296aSGreg Roach */ 16149219296aSGreg Roach public function youngestMarriageMaleName(): string 16159219296aSGreg Roach { 1616f78da678SGreg Roach return $this->family_repository->youngestMarriageMaleName(); 16179219296aSGreg Roach } 16189219296aSGreg Roach 16199219296aSGreg Roach /** 16200dcd9387SGreg Roach * @param string $show_years 16210dcd9387SGreg Roach * 16220dcd9387SGreg Roach * @return string 16239219296aSGreg Roach */ 16249219296aSGreg Roach public function youngestMarriageMaleAge(string $show_years = ''): string 16259219296aSGreg Roach { 1626f78da678SGreg Roach return $this->family_repository->youngestMarriageMaleAge($show_years); 16279219296aSGreg Roach } 16289219296aSGreg Roach 16299219296aSGreg Roach /** 16300dcd9387SGreg Roach * @return string 16319219296aSGreg Roach */ 16329219296aSGreg Roach public function oldestMarriageMale(): string 16339219296aSGreg Roach { 1634f78da678SGreg Roach return $this->family_repository->oldestMarriageMale(); 16359219296aSGreg Roach } 16369219296aSGreg Roach 16379219296aSGreg Roach /** 16380dcd9387SGreg Roach * @return string 16399219296aSGreg Roach */ 16409219296aSGreg Roach public function oldestMarriageMaleName(): string 16419219296aSGreg Roach { 1642f78da678SGreg Roach return $this->family_repository->oldestMarriageMaleName(); 16439219296aSGreg Roach } 16449219296aSGreg Roach 16459219296aSGreg Roach /** 16460dcd9387SGreg Roach * @param string $show_years 16470dcd9387SGreg Roach * 16480dcd9387SGreg Roach * @return string 16499219296aSGreg Roach */ 16509219296aSGreg Roach public function oldestMarriageMaleAge(string $show_years = ''): string 16519219296aSGreg Roach { 1652f78da678SGreg Roach return $this->family_repository->oldestMarriageMaleAge($show_years); 16539219296aSGreg Roach } 16549219296aSGreg Roach 16559219296aSGreg Roach /** 16560dcd9387SGreg Roach * @param string $sex 16570dcd9387SGreg Roach * @param int $year1 16580dcd9387SGreg Roach * @param int $year2 16590dcd9387SGreg Roach * 166076d39c55SGreg Roach * @return array<stdClass> 16619219296aSGreg Roach */ 1662afa8d404SGreg Roach public function statsMarrAgeQuery(string $sex, int $year1 = -1, int $year2 = -1): array 16639219296aSGreg Roach { 1664f78da678SGreg Roach return $this->family_repository->statsMarrAgeQuery($sex, $year1, $year2); 16659219296aSGreg Roach } 16669219296aSGreg Roach 16679219296aSGreg Roach /** 16680dcd9387SGreg Roach * @return string 16699219296aSGreg Roach */ 167088de55fdSRico Sonntag public function statsMarrAge(): string 16719219296aSGreg Roach { 1672f78da678SGreg Roach return $this->family_repository->statsMarrAge(); 16739219296aSGreg Roach } 16749219296aSGreg Roach 16759219296aSGreg Roach /** 16760dcd9387SGreg Roach * @param string $total 16770dcd9387SGreg Roach * 16780dcd9387SGreg Roach * @return string 16799219296aSGreg Roach */ 16809219296aSGreg Roach public function ageBetweenSpousesMF(string $total = '10'): string 16819219296aSGreg Roach { 1682f78da678SGreg Roach return $this->family_repository->ageBetweenSpousesMF((int) $total); 16839219296aSGreg Roach } 16849219296aSGreg Roach 16859219296aSGreg Roach /** 16860dcd9387SGreg Roach * @param string $total 16870dcd9387SGreg Roach * 16880dcd9387SGreg Roach * @return string 16899219296aSGreg Roach */ 16909219296aSGreg Roach public function ageBetweenSpousesMFList(string $total = '10'): string 16919219296aSGreg Roach { 1692f78da678SGreg Roach return $this->family_repository->ageBetweenSpousesMFList((int) $total); 16939219296aSGreg Roach } 16949219296aSGreg Roach 16959219296aSGreg Roach /** 16960dcd9387SGreg Roach * @param string $total 16970dcd9387SGreg Roach * 16980dcd9387SGreg Roach * @return string 16999219296aSGreg Roach */ 17009219296aSGreg Roach public function ageBetweenSpousesFM(string $total = '10'): string 17019219296aSGreg Roach { 1702f78da678SGreg Roach return $this->family_repository->ageBetweenSpousesFM((int) $total); 17039219296aSGreg Roach } 17049219296aSGreg Roach 17059219296aSGreg Roach /** 17060dcd9387SGreg Roach * @param string $total 17070dcd9387SGreg Roach * 17080dcd9387SGreg Roach * @return string 17099219296aSGreg Roach */ 17109219296aSGreg Roach public function ageBetweenSpousesFMList(string $total = '10'): string 17119219296aSGreg Roach { 1712f78da678SGreg Roach return $this->family_repository->ageBetweenSpousesFMList((int) $total); 17139219296aSGreg Roach } 17149219296aSGreg Roach 17159219296aSGreg Roach /** 17160dcd9387SGreg Roach * @return string 17179219296aSGreg Roach */ 17189219296aSGreg Roach public function topAgeOfMarriageFamily(): string 17199219296aSGreg Roach { 1720f78da678SGreg Roach return $this->family_repository->topAgeOfMarriageFamily(); 17219219296aSGreg Roach } 17229219296aSGreg Roach 17239219296aSGreg Roach /** 17240dcd9387SGreg Roach * @return string 17259219296aSGreg Roach */ 17269219296aSGreg Roach public function topAgeOfMarriage(): string 17279219296aSGreg Roach { 1728f78da678SGreg Roach return $this->family_repository->topAgeOfMarriage(); 17299219296aSGreg Roach } 17309219296aSGreg Roach 17319219296aSGreg Roach /** 17320dcd9387SGreg Roach * @param string $total 17330dcd9387SGreg Roach * 17340dcd9387SGreg Roach * @return string 17359219296aSGreg Roach */ 17369219296aSGreg Roach public function topAgeOfMarriageFamilies(string $total = '10'): string 17379219296aSGreg Roach { 1738f78da678SGreg Roach return $this->family_repository->topAgeOfMarriageFamilies((int) $total); 17399219296aSGreg Roach } 17409219296aSGreg Roach 17419219296aSGreg Roach /** 17420dcd9387SGreg Roach * @param string $total 17430dcd9387SGreg Roach * 17440dcd9387SGreg Roach * @return string 17459219296aSGreg Roach */ 17469219296aSGreg Roach public function topAgeOfMarriageFamiliesList(string $total = '10'): string 17479219296aSGreg Roach { 1748f78da678SGreg Roach return $this->family_repository->topAgeOfMarriageFamiliesList((int) $total); 17499219296aSGreg Roach } 17509219296aSGreg Roach 17519219296aSGreg Roach /** 17520dcd9387SGreg Roach * @return string 17539219296aSGreg Roach */ 17549219296aSGreg Roach public function minAgeOfMarriageFamily(): string 17559219296aSGreg Roach { 1756f78da678SGreg Roach return $this->family_repository->minAgeOfMarriageFamily(); 17579219296aSGreg Roach } 17589219296aSGreg Roach 17599219296aSGreg Roach /** 17600dcd9387SGreg Roach * @return string 17619219296aSGreg Roach */ 17629219296aSGreg Roach public function minAgeOfMarriage(): string 17639219296aSGreg Roach { 1764f78da678SGreg Roach return $this->family_repository->minAgeOfMarriage(); 17659219296aSGreg Roach } 17669219296aSGreg Roach 17679219296aSGreg Roach /** 17680dcd9387SGreg Roach * @param string $total 17690dcd9387SGreg Roach * 17700dcd9387SGreg Roach * @return string 17719219296aSGreg Roach */ 17729219296aSGreg Roach public function minAgeOfMarriageFamilies(string $total = '10'): string 17739219296aSGreg Roach { 1774f78da678SGreg Roach return $this->family_repository->minAgeOfMarriageFamilies((int) $total); 17759219296aSGreg Roach } 17769219296aSGreg Roach 17779219296aSGreg Roach /** 17780dcd9387SGreg Roach * @param string $total 17790dcd9387SGreg Roach * 17800dcd9387SGreg Roach * @return string 17819219296aSGreg Roach */ 17829219296aSGreg Roach public function minAgeOfMarriageFamiliesList(string $total = '10'): string 17839219296aSGreg Roach { 1784f78da678SGreg Roach return $this->family_repository->minAgeOfMarriageFamiliesList((int) $total); 17859219296aSGreg Roach } 17869219296aSGreg Roach 17879219296aSGreg Roach /** 17880dcd9387SGreg Roach * @return string 17899219296aSGreg Roach */ 17909219296aSGreg Roach public function youngestMother(): string 17919219296aSGreg Roach { 1792f78da678SGreg Roach return $this->family_repository->youngestMother(); 17939219296aSGreg Roach } 17949219296aSGreg Roach 17959219296aSGreg Roach /** 17960dcd9387SGreg Roach * @return string 17979219296aSGreg Roach */ 17989219296aSGreg Roach public function youngestMotherName(): string 17999219296aSGreg Roach { 1800f78da678SGreg Roach return $this->family_repository->youngestMotherName(); 18019219296aSGreg Roach } 18029219296aSGreg Roach 18039219296aSGreg Roach /** 18040dcd9387SGreg Roach * @param string $show_years 18050dcd9387SGreg Roach * 18060dcd9387SGreg Roach * @return string 18079219296aSGreg Roach */ 18089219296aSGreg Roach public function youngestMotherAge(string $show_years = ''): string 18099219296aSGreg Roach { 1810f78da678SGreg Roach return $this->family_repository->youngestMotherAge($show_years); 18119219296aSGreg Roach } 18129219296aSGreg Roach 18139219296aSGreg Roach /** 18140dcd9387SGreg Roach * @return string 18159219296aSGreg Roach */ 18169219296aSGreg Roach public function oldestMother(): string 18179219296aSGreg Roach { 1818f78da678SGreg Roach return $this->family_repository->oldestMother(); 18199219296aSGreg Roach } 18209219296aSGreg Roach 18219219296aSGreg Roach /** 18220dcd9387SGreg Roach * @return string 18239219296aSGreg Roach */ 18249219296aSGreg Roach public function oldestMotherName(): string 18259219296aSGreg Roach { 1826f78da678SGreg Roach return $this->family_repository->oldestMotherName(); 18279219296aSGreg Roach } 18289219296aSGreg Roach 18299219296aSGreg Roach /** 18300dcd9387SGreg Roach * @param string $show_years 18310dcd9387SGreg Roach * 18320dcd9387SGreg Roach * @return string 18339219296aSGreg Roach */ 18349219296aSGreg Roach public function oldestMotherAge(string $show_years = ''): string 18359219296aSGreg Roach { 1836f78da678SGreg Roach return $this->family_repository->oldestMotherAge($show_years); 18379219296aSGreg Roach } 18389219296aSGreg Roach 18399219296aSGreg Roach /** 18400dcd9387SGreg Roach * @return string 18419219296aSGreg Roach */ 18429219296aSGreg Roach public function youngestFather(): string 18439219296aSGreg Roach { 1844f78da678SGreg Roach return $this->family_repository->youngestFather(); 18459219296aSGreg Roach } 18469219296aSGreg Roach 18479219296aSGreg Roach /** 18480dcd9387SGreg Roach * @return string 18499219296aSGreg Roach */ 18509219296aSGreg Roach public function youngestFatherName(): string 18519219296aSGreg Roach { 1852f78da678SGreg Roach return $this->family_repository->youngestFatherName(); 18539219296aSGreg Roach } 18549219296aSGreg Roach 18559219296aSGreg Roach /** 18560dcd9387SGreg Roach * @param string $show_years 18570dcd9387SGreg Roach * 18580dcd9387SGreg Roach * @return string 18599219296aSGreg Roach */ 18609219296aSGreg Roach public function youngestFatherAge(string $show_years = ''): string 18619219296aSGreg Roach { 1862f78da678SGreg Roach return $this->family_repository->youngestFatherAge($show_years); 18639219296aSGreg Roach } 18649219296aSGreg Roach 18659219296aSGreg Roach /** 18660dcd9387SGreg Roach * @return string 18679219296aSGreg Roach */ 18689219296aSGreg Roach public function oldestFather(): string 18699219296aSGreg Roach { 1870f78da678SGreg Roach return $this->family_repository->oldestFather(); 18719219296aSGreg Roach } 18729219296aSGreg Roach 18739219296aSGreg Roach /** 18740dcd9387SGreg Roach * @return string 18759219296aSGreg Roach */ 18769219296aSGreg Roach public function oldestFatherName(): string 18779219296aSGreg Roach { 1878f78da678SGreg Roach return $this->family_repository->oldestFatherName(); 18799219296aSGreg Roach } 18809219296aSGreg Roach 18819219296aSGreg Roach /** 18820dcd9387SGreg Roach * @param string $show_years 18830dcd9387SGreg Roach * 18840dcd9387SGreg Roach * @return string 18859219296aSGreg Roach */ 18869219296aSGreg Roach public function oldestFatherAge(string $show_years = ''): string 18879219296aSGreg Roach { 1888f78da678SGreg Roach return $this->family_repository->oldestFatherAge($show_years); 18899219296aSGreg Roach } 18909219296aSGreg Roach 18919219296aSGreg Roach /** 18920dcd9387SGreg Roach * @return string 18939219296aSGreg Roach */ 18949219296aSGreg Roach public function totalMarriedMales(): string 18959219296aSGreg Roach { 1896f78da678SGreg Roach return $this->family_repository->totalMarriedMales(); 18979219296aSGreg Roach } 18989219296aSGreg Roach 18999219296aSGreg Roach /** 19000dcd9387SGreg Roach * @return string 19019219296aSGreg Roach */ 19029219296aSGreg Roach public function totalMarriedFemales(): string 19039219296aSGreg Roach { 1904f78da678SGreg Roach return $this->family_repository->totalMarriedFemales(); 19059219296aSGreg Roach } 19069219296aSGreg Roach 19079219296aSGreg Roach /** 19080dcd9387SGreg Roach * @param int $year1 19090dcd9387SGreg Roach * @param int $year2 19100dcd9387SGreg Roach * 19110dcd9387SGreg Roach * @return Builder 19129219296aSGreg Roach */ 1913999da590SGreg Roach public function monthFirstChildQuery(int $year1 = -1, int $year2 = -1): Builder 19149219296aSGreg Roach { 1915f78da678SGreg Roach return $this->family_repository->monthFirstChildQuery($year1, $year2); 1916999da590SGreg Roach } 1917999da590SGreg Roach 1918999da590SGreg Roach /** 19190dcd9387SGreg Roach * @param int $year1 19200dcd9387SGreg Roach * @param int $year2 19210dcd9387SGreg Roach * 19220dcd9387SGreg Roach * @return Builder 1923999da590SGreg Roach */ 1924999da590SGreg Roach public function monthFirstChildBySexQuery(int $year1 = -1, int $year2 = -1): Builder 1925999da590SGreg Roach { 1926f78da678SGreg Roach return $this->family_repository->monthFirstChildBySexQuery($year1, $year2); 19279219296aSGreg Roach } 19289219296aSGreg Roach 19299219296aSGreg Roach /** 19300dcd9387SGreg Roach * @return string 19319219296aSGreg Roach */ 19329219296aSGreg Roach public function largestFamily(): string 19339219296aSGreg Roach { 1934f78da678SGreg Roach return $this->family_repository->largestFamily(); 19359219296aSGreg Roach } 19369219296aSGreg Roach 19379219296aSGreg Roach /** 19380dcd9387SGreg Roach * @return string 19399219296aSGreg Roach */ 19409219296aSGreg Roach public function largestFamilySize(): string 19419219296aSGreg Roach { 1942f78da678SGreg Roach return $this->family_repository->largestFamilySize(); 19439219296aSGreg Roach } 19449219296aSGreg Roach 19459219296aSGreg Roach /** 19460dcd9387SGreg Roach * @return string 19479219296aSGreg Roach */ 19489219296aSGreg Roach public function largestFamilyName(): string 19499219296aSGreg Roach { 1950f78da678SGreg Roach return $this->family_repository->largestFamilyName(); 19519219296aSGreg Roach } 19529219296aSGreg Roach 19539219296aSGreg Roach /** 19540dcd9387SGreg Roach * @param string $total 19550dcd9387SGreg Roach * 19560dcd9387SGreg Roach * @return string 19579219296aSGreg Roach */ 19589219296aSGreg Roach public function topTenLargestFamily(string $total = '10'): string 19599219296aSGreg Roach { 1960f78da678SGreg Roach return $this->family_repository->topTenLargestFamily((int) $total); 19619219296aSGreg Roach } 19629219296aSGreg Roach 19639219296aSGreg Roach /** 19640dcd9387SGreg Roach * @param string $total 19650dcd9387SGreg Roach * 19660dcd9387SGreg Roach * @return string 19679219296aSGreg Roach */ 19689219296aSGreg Roach public function topTenLargestFamilyList(string $total = '10'): string 19699219296aSGreg Roach { 1970f78da678SGreg Roach return $this->family_repository->topTenLargestFamilyList((int) $total); 19719219296aSGreg Roach } 19729219296aSGreg Roach 19739219296aSGreg Roach /** 19740dcd9387SGreg Roach * @param string|null $color_from 19750dcd9387SGreg Roach * @param string|null $color_to 19760dcd9387SGreg Roach * @param string $total 19770dcd9387SGreg Roach * 19780dcd9387SGreg Roach * @return string 19799219296aSGreg Roach */ 19809219296aSGreg Roach public function chartLargestFamilies( 19812c6f1bd5SGreg Roach string|null $color_from = null, 19822c6f1bd5SGreg Roach string|null $color_to = null, 19839219296aSGreg Roach string $total = '10' 1984c81b7bf1SGreg Roach ): string { 1985f78da678SGreg Roach return $this->family_repository->chartLargestFamilies($color_from, $color_to, (int) $total); 19869219296aSGreg Roach } 19879219296aSGreg Roach 19889219296aSGreg Roach /** 19890dcd9387SGreg Roach * @return string 19909219296aSGreg Roach */ 19919219296aSGreg Roach public function totalChildren(): string 19929219296aSGreg Roach { 1993f78da678SGreg Roach return $this->family_repository->totalChildren(); 19949219296aSGreg Roach } 19959219296aSGreg Roach 19969219296aSGreg Roach /** 19970dcd9387SGreg Roach * @return string 19989219296aSGreg Roach */ 19999219296aSGreg Roach public function averageChildren(): string 20009219296aSGreg Roach { 2001f78da678SGreg Roach return $this->family_repository->averageChildren(); 20029219296aSGreg Roach } 20039219296aSGreg Roach 20049219296aSGreg Roach /** 20050dcd9387SGreg Roach * @param int $year1 20060dcd9387SGreg Roach * @param int $year2 20070dcd9387SGreg Roach * 200876d39c55SGreg Roach * @return array<stdClass> 20099219296aSGreg Roach */ 2010b1126ab4SGreg Roach public function statsChildrenQuery(int $year1 = -1, int $year2 = -1): array 20119219296aSGreg Roach { 2012f78da678SGreg Roach return $this->family_repository->statsChildrenQuery($year1, $year2); 20139219296aSGreg Roach } 20149219296aSGreg Roach 20159219296aSGreg Roach /** 20160dcd9387SGreg Roach * @return string 20179219296aSGreg Roach */ 2018cde1d378SGreg Roach public function statsChildren(): string 20199219296aSGreg Roach { 2020f78da678SGreg Roach return $this->family_repository->statsChildren(); 20219219296aSGreg Roach } 20229219296aSGreg Roach 20239219296aSGreg Roach /** 20240dcd9387SGreg Roach * @param string $total 20250dcd9387SGreg Roach * 20260dcd9387SGreg Roach * @return string 20279219296aSGreg Roach */ 20289219296aSGreg Roach public function topAgeBetweenSiblingsName(string $total = '10'): string 20299219296aSGreg Roach { 2030f78da678SGreg Roach return $this->family_repository->topAgeBetweenSiblingsName((int) $total); 20319219296aSGreg Roach } 20329219296aSGreg Roach 20339219296aSGreg Roach /** 20340dcd9387SGreg Roach * @param string $total 20350dcd9387SGreg Roach * 20360dcd9387SGreg Roach * @return string 20379219296aSGreg Roach */ 20389219296aSGreg Roach public function topAgeBetweenSiblings(string $total = '10'): string 20399219296aSGreg Roach { 2040f78da678SGreg Roach return $this->family_repository->topAgeBetweenSiblings((int) $total); 20419219296aSGreg Roach } 20429219296aSGreg Roach 20439219296aSGreg Roach /** 20440dcd9387SGreg Roach * @param string $total 20450dcd9387SGreg Roach * 20460dcd9387SGreg Roach * @return string 20479219296aSGreg Roach */ 20489219296aSGreg Roach public function topAgeBetweenSiblingsFullName(string $total = '10'): string 20499219296aSGreg Roach { 2050f78da678SGreg Roach return $this->family_repository->topAgeBetweenSiblingsFullName((int) $total); 20519219296aSGreg Roach } 20529219296aSGreg Roach 20539219296aSGreg Roach /** 20540dcd9387SGreg Roach * @param string $total 20550dcd9387SGreg Roach * @param string $one 20560dcd9387SGreg Roach * 20570dcd9387SGreg Roach * @return string 20589219296aSGreg Roach */ 20599219296aSGreg Roach public function topAgeBetweenSiblingsList(string $total = '10', string $one = ''): string 20609219296aSGreg Roach { 2061f78da678SGreg Roach return $this->family_repository->topAgeBetweenSiblingsList((int) $total, $one); 20629219296aSGreg Roach } 20639219296aSGreg Roach 20649219296aSGreg Roach /** 20650dcd9387SGreg Roach * @return string 20669219296aSGreg Roach */ 20679219296aSGreg Roach public function noChildrenFamilies(): string 20689219296aSGreg Roach { 2069f78da678SGreg Roach return $this->family_repository->noChildrenFamilies(); 20709219296aSGreg Roach } 20719219296aSGreg Roach 20729219296aSGreg Roach /** 20730dcd9387SGreg Roach * @param string $type 20740dcd9387SGreg Roach * 20750dcd9387SGreg Roach * @return string 20769219296aSGreg Roach */ 20779219296aSGreg Roach public function noChildrenFamiliesList(string $type = 'list'): string 20789219296aSGreg Roach { 2079f78da678SGreg Roach return $this->family_repository->noChildrenFamiliesList($type); 20809219296aSGreg Roach } 20819219296aSGreg Roach 20829219296aSGreg Roach /** 20830dcd9387SGreg Roach * @param string $year1 20840dcd9387SGreg Roach * @param string $year2 20850dcd9387SGreg Roach * 20860dcd9387SGreg Roach * @return string 20879219296aSGreg Roach */ 20889219296aSGreg Roach public function chartNoChildrenFamilies( 20899219296aSGreg Roach string $year1 = '-1', 20909219296aSGreg Roach string $year2 = '-1' 2091c81b7bf1SGreg Roach ): string { 2092f78da678SGreg Roach return $this->family_repository->chartNoChildrenFamilies((int) $year1, (int) $year2); 20939219296aSGreg Roach } 20949219296aSGreg Roach 20959219296aSGreg Roach /** 20960dcd9387SGreg Roach * @param string $total 20970dcd9387SGreg Roach * 20980dcd9387SGreg Roach * @return string 20999219296aSGreg Roach */ 21009219296aSGreg Roach public function topTenLargestGrandFamily(string $total = '10'): string 21019219296aSGreg Roach { 2102f78da678SGreg Roach return $this->family_repository->topTenLargestGrandFamily((int) $total); 21039219296aSGreg Roach } 21049219296aSGreg Roach 21059219296aSGreg Roach /** 21060dcd9387SGreg Roach * @param string $total 21070dcd9387SGreg Roach * 21080dcd9387SGreg Roach * @return string 21099219296aSGreg Roach */ 21109219296aSGreg Roach public function topTenLargestGrandFamilyList(string $total = '10'): string 21119219296aSGreg Roach { 2112f78da678SGreg Roach return $this->family_repository->topTenLargestGrandFamilyList((int) $total); 21139219296aSGreg Roach } 21149219296aSGreg Roach 21159219296aSGreg Roach /** 21160dcd9387SGreg Roach * @return string 21179219296aSGreg Roach */ 21189219296aSGreg Roach public function getCommonSurname(): string 21199219296aSGreg Roach { 2120f78da678SGreg Roach return $this->individual_repository->getCommonSurname(); 21219219296aSGreg Roach } 21229219296aSGreg Roach 21239219296aSGreg Roach /** 21240dcd9387SGreg Roach * @param string $threshold 21250dcd9387SGreg Roach * @param string $number_of_surnames 21260dcd9387SGreg Roach * @param string $sorting 21270dcd9387SGreg Roach * 21280dcd9387SGreg Roach * @return string 21299219296aSGreg Roach */ 21309219296aSGreg Roach public function commonSurnames( 21319219296aSGreg Roach string $threshold = '1', 21329219296aSGreg Roach string $number_of_surnames = '10', 21339219296aSGreg Roach string $sorting = 'alpha' 2134c81b7bf1SGreg Roach ): string { 2135f78da678SGreg Roach return $this->individual_repository->commonSurnames((int) $threshold, (int) $number_of_surnames, $sorting); 21369219296aSGreg Roach } 21379219296aSGreg Roach 21389219296aSGreg Roach /** 21390dcd9387SGreg Roach * @param string $threshold 21400dcd9387SGreg Roach * @param string $number_of_surnames 21410dcd9387SGreg Roach * @param string $sorting 21420dcd9387SGreg Roach * 21430dcd9387SGreg Roach * @return string 21449219296aSGreg Roach */ 21459219296aSGreg Roach public function commonSurnamesTotals( 21469219296aSGreg Roach string $threshold = '1', 21479219296aSGreg Roach string $number_of_surnames = '10', 21482da2e0a6SGreg Roach string $sorting = 'count' 2149c81b7bf1SGreg Roach ): string { 2150f78da678SGreg Roach return $this->individual_repository->commonSurnamesTotals((int) $threshold, (int) $number_of_surnames, $sorting); 21519219296aSGreg Roach } 21529219296aSGreg Roach 21539219296aSGreg Roach /** 21540dcd9387SGreg Roach * @param string $threshold 21550dcd9387SGreg Roach * @param string $number_of_surnames 21560dcd9387SGreg Roach * @param string $sorting 21570dcd9387SGreg Roach * 21580dcd9387SGreg Roach * @return string 21599219296aSGreg Roach */ 21609219296aSGreg Roach public function commonSurnamesList( 21619219296aSGreg Roach string $threshold = '1', 21629219296aSGreg Roach string $number_of_surnames = '10', 21639219296aSGreg Roach string $sorting = 'alpha' 2164c81b7bf1SGreg Roach ): string { 2165f78da678SGreg Roach return $this->individual_repository->commonSurnamesList((int) $threshold, (int) $number_of_surnames, $sorting); 21669219296aSGreg Roach } 21679219296aSGreg Roach 21689219296aSGreg Roach /** 21690dcd9387SGreg Roach * @param string $threshold 21700dcd9387SGreg Roach * @param string $number_of_surnames 21710dcd9387SGreg Roach * @param string $sorting 21720dcd9387SGreg Roach * 21730dcd9387SGreg Roach * @return string 21749219296aSGreg Roach */ 21759219296aSGreg Roach public function commonSurnamesListTotals( 21769219296aSGreg Roach string $threshold = '1', 21779219296aSGreg Roach string $number_of_surnames = '10', 21782da2e0a6SGreg Roach string $sorting = 'count' 2179c81b7bf1SGreg Roach ): string { 2180f78da678SGreg Roach return $this->individual_repository 21819219296aSGreg Roach ->commonSurnamesListTotals((int) $threshold, (int) $number_of_surnames, $sorting); 21829219296aSGreg Roach } 21839219296aSGreg Roach 21849219296aSGreg Roach /** 21850dcd9387SGreg Roach * @param string|null $color_from 21860dcd9387SGreg Roach * @param string|null $color_to 21870dcd9387SGreg Roach * @param string $number_of_surnames 21880dcd9387SGreg Roach * 21890dcd9387SGreg Roach * @return string 21909219296aSGreg Roach */ 21919219296aSGreg Roach public function chartCommonSurnames( 21922c6f1bd5SGreg Roach string|null $color_from = null, 21932c6f1bd5SGreg Roach string|null $color_to = null, 21949219296aSGreg Roach string $number_of_surnames = '10' 2195c81b7bf1SGreg Roach ): string { 2196f78da678SGreg Roach return $this->individual_repository 219788de55fdSRico Sonntag ->chartCommonSurnames($color_from, $color_to, (int) $number_of_surnames); 21989219296aSGreg Roach } 21999219296aSGreg Roach 22009219296aSGreg Roach /** 22010dcd9387SGreg Roach * @param string $threshold 22020dcd9387SGreg Roach * @param string $maxtoshow 22030dcd9387SGreg Roach * 22040dcd9387SGreg Roach * @return string 22059219296aSGreg Roach */ 22069219296aSGreg Roach public function commonGiven(string $threshold = '1', string $maxtoshow = '10'): string 22079219296aSGreg Roach { 2208f78da678SGreg Roach return $this->individual_repository->commonGiven((int) $threshold, (int) $maxtoshow); 22099219296aSGreg Roach } 22109219296aSGreg Roach 22119219296aSGreg Roach /** 22120dcd9387SGreg Roach * @param string $threshold 22130dcd9387SGreg Roach * @param string $maxtoshow 22140dcd9387SGreg Roach * 22150dcd9387SGreg Roach * @return string 22169219296aSGreg Roach */ 22179219296aSGreg Roach public function commonGivenTotals(string $threshold = '1', string $maxtoshow = '10'): string 22189219296aSGreg Roach { 2219f78da678SGreg Roach return $this->individual_repository->commonGivenTotals((int) $threshold, (int) $maxtoshow); 22209219296aSGreg Roach } 22219219296aSGreg Roach 22229219296aSGreg Roach /** 22230dcd9387SGreg Roach * @param string $threshold 22240dcd9387SGreg Roach * @param string $maxtoshow 22250dcd9387SGreg Roach * 22260dcd9387SGreg Roach * @return string 22279219296aSGreg Roach */ 22289219296aSGreg Roach public function commonGivenList(string $threshold = '1', string $maxtoshow = '10'): string 22299219296aSGreg Roach { 2230f78da678SGreg Roach return $this->individual_repository->commonGivenList((int) $threshold, (int) $maxtoshow); 22319219296aSGreg Roach } 22329219296aSGreg Roach 22339219296aSGreg Roach /** 22340dcd9387SGreg Roach * @param string $threshold 22350dcd9387SGreg Roach * @param string $maxtoshow 22360dcd9387SGreg Roach * 22370dcd9387SGreg Roach * @return string 22389219296aSGreg Roach */ 22399219296aSGreg Roach public function commonGivenListTotals(string $threshold = '1', string $maxtoshow = '10'): string 22409219296aSGreg Roach { 2241f78da678SGreg Roach return $this->individual_repository->commonGivenListTotals((int) $threshold, (int) $maxtoshow); 22429219296aSGreg Roach } 22439219296aSGreg Roach 22449219296aSGreg Roach /** 22450dcd9387SGreg Roach * @param string $threshold 22460dcd9387SGreg Roach * @param string $maxtoshow 22470dcd9387SGreg Roach * 22480dcd9387SGreg Roach * @return string 22499219296aSGreg Roach */ 22509219296aSGreg Roach public function commonGivenTable(string $threshold = '1', string $maxtoshow = '10'): string 22519219296aSGreg Roach { 2252f78da678SGreg Roach return $this->individual_repository->commonGivenTable((int) $threshold, (int) $maxtoshow); 22539219296aSGreg Roach } 22549219296aSGreg Roach 22559219296aSGreg Roach /** 22560dcd9387SGreg Roach * @param string $threshold 22570dcd9387SGreg Roach * @param string $maxtoshow 22580dcd9387SGreg Roach * 22590dcd9387SGreg Roach * @return string 22609219296aSGreg Roach */ 22619219296aSGreg Roach public function commonGivenFemale(string $threshold = '1', string $maxtoshow = '10'): string 22629219296aSGreg Roach { 2263f78da678SGreg Roach return $this->individual_repository->commonGivenFemale((int) $threshold, (int) $maxtoshow); 22649219296aSGreg Roach } 22659219296aSGreg Roach 22669219296aSGreg Roach /** 22670dcd9387SGreg Roach * @param string $threshold 22680dcd9387SGreg Roach * @param string $maxtoshow 22690dcd9387SGreg Roach * 22700dcd9387SGreg Roach * @return string 22719219296aSGreg Roach */ 22729219296aSGreg Roach public function commonGivenFemaleTotals(string $threshold = '1', string $maxtoshow = '10'): string 22739219296aSGreg Roach { 2274f78da678SGreg Roach return $this->individual_repository->commonGivenFemaleTotals((int) $threshold, (int) $maxtoshow); 22759219296aSGreg Roach } 22769219296aSGreg Roach 22779219296aSGreg Roach /** 22780dcd9387SGreg Roach * @param string $threshold 22790dcd9387SGreg Roach * @param string $maxtoshow 22800dcd9387SGreg Roach * 22810dcd9387SGreg Roach * @return string 22829219296aSGreg Roach */ 22839219296aSGreg Roach public function commonGivenFemaleList(string $threshold = '1', string $maxtoshow = '10'): string 22849219296aSGreg Roach { 2285f78da678SGreg Roach return $this->individual_repository->commonGivenFemaleList((int) $threshold, (int) $maxtoshow); 22869219296aSGreg Roach } 22879219296aSGreg Roach 22889219296aSGreg Roach /** 22890dcd9387SGreg Roach * @param string $threshold 22900dcd9387SGreg Roach * @param string $maxtoshow 22910dcd9387SGreg Roach * 22920dcd9387SGreg Roach * @return string 22939219296aSGreg Roach */ 22949219296aSGreg Roach public function commonGivenFemaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string 22959219296aSGreg Roach { 2296f78da678SGreg Roach return $this->individual_repository->commonGivenFemaleListTotals((int) $threshold, (int) $maxtoshow); 22979219296aSGreg Roach } 22989219296aSGreg Roach 22999219296aSGreg Roach /** 23000dcd9387SGreg Roach * @param string $threshold 23010dcd9387SGreg Roach * @param string $maxtoshow 23020dcd9387SGreg Roach * 23030dcd9387SGreg Roach * @return string 23049219296aSGreg Roach */ 23059219296aSGreg Roach public function commonGivenFemaleTable(string $threshold = '1', string $maxtoshow = '10'): string 23069219296aSGreg Roach { 2307f78da678SGreg Roach return $this->individual_repository->commonGivenFemaleTable((int) $threshold, (int) $maxtoshow); 23089219296aSGreg Roach } 23099219296aSGreg Roach 23109219296aSGreg Roach /** 23110dcd9387SGreg Roach * @param string $threshold 23120dcd9387SGreg Roach * @param string $maxtoshow 23130dcd9387SGreg Roach * 23140dcd9387SGreg Roach * @return string 23159219296aSGreg Roach */ 23169219296aSGreg Roach public function commonGivenMale(string $threshold = '1', string $maxtoshow = '10'): string 23179219296aSGreg Roach { 2318f78da678SGreg Roach return $this->individual_repository->commonGivenMale((int) $threshold, (int) $maxtoshow); 23199219296aSGreg Roach } 23209219296aSGreg Roach 23219219296aSGreg Roach /** 23220dcd9387SGreg Roach * @param string $threshold 23230dcd9387SGreg Roach * @param string $maxtoshow 23240dcd9387SGreg Roach * 23250dcd9387SGreg Roach * @return string 23269219296aSGreg Roach */ 23279219296aSGreg Roach public function commonGivenMaleTotals(string $threshold = '1', string $maxtoshow = '10'): string 23289219296aSGreg Roach { 2329f78da678SGreg Roach return $this->individual_repository->commonGivenMaleTotals((int) $threshold, (int) $maxtoshow); 23309219296aSGreg Roach } 23319219296aSGreg Roach 23329219296aSGreg Roach /** 23330dcd9387SGreg Roach * @param string $threshold 23340dcd9387SGreg Roach * @param string $maxtoshow 23350dcd9387SGreg Roach * 23360dcd9387SGreg Roach * @return string 23379219296aSGreg Roach */ 23389219296aSGreg Roach public function commonGivenMaleList(string $threshold = '1', string $maxtoshow = '10'): string 23399219296aSGreg Roach { 2340f78da678SGreg Roach return $this->individual_repository->commonGivenMaleList((int) $threshold, (int) $maxtoshow); 23419219296aSGreg Roach } 23429219296aSGreg Roach 23439219296aSGreg Roach /** 23440dcd9387SGreg Roach * @param string $threshold 23450dcd9387SGreg Roach * @param string $maxtoshow 23460dcd9387SGreg Roach * 23470dcd9387SGreg Roach * @return string 23489219296aSGreg Roach */ 23499219296aSGreg Roach public function commonGivenMaleListTotals(string $threshold = '1', string $maxtoshow = '10'): string 23509219296aSGreg Roach { 2351f78da678SGreg Roach return $this->individual_repository->commonGivenMaleListTotals((int) $threshold, (int) $maxtoshow); 23529219296aSGreg Roach } 23539219296aSGreg Roach 23549219296aSGreg Roach /** 23550dcd9387SGreg Roach * @param string $threshold 23560dcd9387SGreg Roach * @param string $maxtoshow 23570dcd9387SGreg Roach * 23580dcd9387SGreg Roach * @return string 23599219296aSGreg Roach */ 23609219296aSGreg Roach public function commonGivenMaleTable(string $threshold = '1', string $maxtoshow = '10'): string 23619219296aSGreg Roach { 2362f78da678SGreg Roach return $this->individual_repository->commonGivenMaleTable((int) $threshold, (int) $maxtoshow); 23639219296aSGreg Roach } 23649219296aSGreg Roach 23659219296aSGreg Roach /** 23660dcd9387SGreg Roach * @param string $threshold 23670dcd9387SGreg Roach * @param string $maxtoshow 23680dcd9387SGreg Roach * 23690dcd9387SGreg Roach * @return string 23709219296aSGreg Roach */ 23719219296aSGreg Roach public function commonGivenUnknown(string $threshold = '1', string $maxtoshow = '10'): string 23729219296aSGreg Roach { 2373f78da678SGreg Roach return $this->individual_repository->commonGivenUnknown((int) $threshold, (int) $maxtoshow); 23749219296aSGreg Roach } 23759219296aSGreg Roach 23769219296aSGreg Roach /** 23770dcd9387SGreg Roach * @param string $threshold 23780dcd9387SGreg Roach * @param string $maxtoshow 23790dcd9387SGreg Roach * 23800dcd9387SGreg Roach * @return string 23819219296aSGreg Roach */ 23829219296aSGreg Roach public function commonGivenUnknownTotals(string $threshold = '1', string $maxtoshow = '10'): string 23839219296aSGreg Roach { 2384f78da678SGreg Roach return $this->individual_repository->commonGivenUnknownTotals((int) $threshold, (int) $maxtoshow); 23859219296aSGreg Roach } 23869219296aSGreg Roach 23879219296aSGreg Roach /** 23880dcd9387SGreg Roach * @param string $threshold 23890dcd9387SGreg Roach * @param string $maxtoshow 23900dcd9387SGreg Roach * 23910dcd9387SGreg Roach * @return string 23929219296aSGreg Roach */ 23939219296aSGreg Roach public function commonGivenUnknownList(string $threshold = '1', string $maxtoshow = '10'): string 23949219296aSGreg Roach { 2395f78da678SGreg Roach return $this->individual_repository->commonGivenUnknownList((int) $threshold, (int) $maxtoshow); 23969219296aSGreg Roach } 23979219296aSGreg Roach 23989219296aSGreg Roach /** 23990dcd9387SGreg Roach * @param string $threshold 24000dcd9387SGreg Roach * @param string $maxtoshow 24010dcd9387SGreg Roach * 24020dcd9387SGreg Roach * @return string 24039219296aSGreg Roach */ 24049219296aSGreg Roach public function commonGivenUnknownListTotals(string $threshold = '1', string $maxtoshow = '10'): string 24059219296aSGreg Roach { 2406f78da678SGreg Roach return $this->individual_repository->commonGivenUnknownListTotals((int) $threshold, (int) $maxtoshow); 24079219296aSGreg Roach } 24089219296aSGreg Roach 24099219296aSGreg Roach /** 24100dcd9387SGreg Roach * @param string $threshold 24110dcd9387SGreg Roach * @param string $maxtoshow 24120dcd9387SGreg Roach * 24130dcd9387SGreg Roach * @return string 24149219296aSGreg Roach */ 24159219296aSGreg Roach public function commonGivenUnknownTable(string $threshold = '1', string $maxtoshow = '10'): string 24169219296aSGreg Roach { 2417f78da678SGreg Roach return $this->individual_repository->commonGivenUnknownTable((int) $threshold, (int) $maxtoshow); 24189219296aSGreg Roach } 24199219296aSGreg Roach 24209219296aSGreg Roach /** 24210dcd9387SGreg Roach * @param string|null $color_from 24220dcd9387SGreg Roach * @param string|null $color_to 24230dcd9387SGreg Roach * @param string $maxtoshow 24240dcd9387SGreg Roach * 24250dcd9387SGreg Roach * @return string 24269219296aSGreg Roach */ 24279219296aSGreg Roach public function chartCommonGiven( 24282c6f1bd5SGreg Roach string|null $color_from = null, 24292c6f1bd5SGreg Roach string|null $color_to = null, 24309219296aSGreg Roach string $maxtoshow = '7' 2431c81b7bf1SGreg Roach ): string { 2432f78da678SGreg Roach return $this->individual_repository->chartCommonGiven($color_from, $color_to, (int) $maxtoshow); 24339219296aSGreg Roach } 24349219296aSGreg Roach 24359219296aSGreg Roach /** 24360dcd9387SGreg Roach * @return string 24379219296aSGreg Roach */ 24389219296aSGreg Roach public function usersLoggedIn(): string 24399219296aSGreg Roach { 2440f78da678SGreg Roach return $this->user_repository->usersLoggedIn(); 24419219296aSGreg Roach } 24429219296aSGreg Roach 24439219296aSGreg Roach /** 24440dcd9387SGreg Roach * @return string 24459219296aSGreg Roach */ 24469219296aSGreg Roach public function usersLoggedInList(): string 24479219296aSGreg Roach { 2448f78da678SGreg Roach return $this->user_repository->usersLoggedInList(); 24499219296aSGreg Roach } 24509219296aSGreg Roach 24519219296aSGreg Roach /** 24520dcd9387SGreg Roach * @return int 24539219296aSGreg Roach */ 24549219296aSGreg Roach public function usersLoggedInTotal(): int 24559219296aSGreg Roach { 2456f78da678SGreg Roach return $this->user_repository->usersLoggedInTotal(); 24579219296aSGreg Roach } 24589219296aSGreg Roach 24599219296aSGreg Roach /** 24600dcd9387SGreg Roach * @return int 24619219296aSGreg Roach */ 24629219296aSGreg Roach public function usersLoggedInTotalAnon(): int 24639219296aSGreg Roach { 2464f78da678SGreg Roach return $this->user_repository->usersLoggedInTotalAnon(); 24659219296aSGreg Roach } 24669219296aSGreg Roach 24679219296aSGreg Roach /** 24680dcd9387SGreg Roach * @return int 24699219296aSGreg Roach */ 24709219296aSGreg Roach public function usersLoggedInTotalVisible(): int 24719219296aSGreg Roach { 2472f78da678SGreg Roach return $this->user_repository->usersLoggedInTotalVisible(); 24739219296aSGreg Roach } 24749219296aSGreg Roach 24759219296aSGreg Roach /** 24760dcd9387SGreg Roach * @return string 24779219296aSGreg Roach */ 24789219296aSGreg Roach public function userId(): string 24799219296aSGreg Roach { 2480f78da678SGreg Roach return $this->user_repository->userId(); 24819219296aSGreg Roach } 24829219296aSGreg Roach 24839219296aSGreg Roach /** 24840dcd9387SGreg Roach * @param string $visitor_text 24850dcd9387SGreg Roach * 24860dcd9387SGreg Roach * @return string 24879219296aSGreg Roach */ 24889219296aSGreg Roach public function userName(string $visitor_text = ''): string 24899219296aSGreg Roach { 2490f78da678SGreg Roach return $this->user_repository->userName($visitor_text); 24919219296aSGreg Roach } 24929219296aSGreg Roach 24939219296aSGreg Roach /** 24940dcd9387SGreg Roach * @return string 24959219296aSGreg Roach */ 24969219296aSGreg Roach public function userFullName(): string 24979219296aSGreg Roach { 2498f78da678SGreg Roach return $this->user_repository->userFullName(); 24999219296aSGreg Roach } 25009219296aSGreg Roach 25019219296aSGreg Roach /** 25020dcd9387SGreg Roach * @return string 25039219296aSGreg Roach */ 25049219296aSGreg Roach public function totalUsers(): string 25059219296aSGreg Roach { 2506f78da678SGreg Roach return $this->user_repository->totalUsers(); 25079219296aSGreg Roach } 25089219296aSGreg Roach 25099219296aSGreg Roach /** 25100dcd9387SGreg Roach * @return string 25119219296aSGreg Roach */ 25129219296aSGreg Roach public function totalAdmins(): string 25139219296aSGreg Roach { 2514f78da678SGreg Roach return $this->user_repository->totalAdmins(); 25159219296aSGreg Roach } 25169219296aSGreg Roach 25179219296aSGreg Roach /** 25180dcd9387SGreg Roach * @return string 25199219296aSGreg Roach */ 25209219296aSGreg Roach public function totalNonAdmins(): string 25219219296aSGreg Roach { 2522f78da678SGreg Roach return $this->user_repository->totalNonAdmins(); 25239219296aSGreg Roach } 25249219296aSGreg Roach 25259219296aSGreg Roach /** 25260dcd9387SGreg Roach * @return string 25279219296aSGreg Roach */ 25289219296aSGreg Roach public function latestUserId(): string 25299219296aSGreg Roach { 2530f78da678SGreg Roach return $this->latest_user_repository->latestUserId(); 25319219296aSGreg Roach } 25329219296aSGreg Roach 25339219296aSGreg Roach /** 25340dcd9387SGreg Roach * @return string 25359219296aSGreg Roach */ 25369219296aSGreg Roach public function latestUserName(): string 25379219296aSGreg Roach { 2538f78da678SGreg Roach return $this->latest_user_repository->latestUserName(); 25399219296aSGreg Roach } 25409219296aSGreg Roach 25419219296aSGreg Roach /** 25420dcd9387SGreg Roach * @return string 25439219296aSGreg Roach */ 25449219296aSGreg Roach public function latestUserFullName(): string 25459219296aSGreg Roach { 2546f78da678SGreg Roach return $this->latest_user_repository->latestUserFullName(); 25479219296aSGreg Roach } 25489219296aSGreg Roach 25499219296aSGreg Roach /** 25500dcd9387SGreg Roach * @param string|null $format 25510dcd9387SGreg Roach * 25520dcd9387SGreg Roach * @return string 25539219296aSGreg Roach */ 25542c6f1bd5SGreg Roach public function latestUserRegDate(string|null $format = null): string 25559219296aSGreg Roach { 2556f78da678SGreg Roach return $this->latest_user_repository->latestUserRegDate($format); 25579219296aSGreg Roach } 25589219296aSGreg Roach 25599219296aSGreg Roach /** 25600dcd9387SGreg Roach * @param string|null $format 25610dcd9387SGreg Roach * 25620dcd9387SGreg Roach * @return string 25639219296aSGreg Roach */ 25642c6f1bd5SGreg Roach public function latestUserRegTime(string|null $format = null): string 25659219296aSGreg Roach { 2566f78da678SGreg Roach return $this->latest_user_repository->latestUserRegTime($format); 25679219296aSGreg Roach } 25689219296aSGreg Roach 25699219296aSGreg Roach /** 25700dcd9387SGreg Roach * @param string|null $yes 25710dcd9387SGreg Roach * @param string|null $no 25720dcd9387SGreg Roach * 25730dcd9387SGreg Roach * @return string 25749219296aSGreg Roach */ 25752c6f1bd5SGreg Roach public function latestUserLoggedin(string|null $yes = null, string|null $no = null): string 25769219296aSGreg Roach { 2577f78da678SGreg Roach return $this->latest_user_repository->latestUserLoggedin($yes, $no); 25789219296aSGreg Roach } 25799219296aSGreg Roach 25809219296aSGreg Roach /** 25810dcd9387SGreg Roach * @return string 25829219296aSGreg Roach */ 25839219296aSGreg Roach public function contactWebmaster(): string 25849219296aSGreg Roach { 2585f78da678SGreg Roach return $this->contact_repository->contactWebmaster(); 25869219296aSGreg Roach } 25879219296aSGreg Roach 25889219296aSGreg Roach /** 25890dcd9387SGreg Roach * @return string 25909219296aSGreg Roach */ 25919219296aSGreg Roach public function contactGedcom(): string 25929219296aSGreg Roach { 2593f78da678SGreg Roach return $this->contact_repository->contactGedcom(); 25949219296aSGreg Roach } 25959219296aSGreg Roach 25969219296aSGreg Roach /** 25970dcd9387SGreg Roach * @return string 25989219296aSGreg Roach */ 25999219296aSGreg Roach public function serverDate(): string 26009219296aSGreg Roach { 2601f78da678SGreg Roach return $this->server_repository->serverDate(); 26029219296aSGreg Roach } 26039219296aSGreg Roach 26049219296aSGreg Roach /** 26050dcd9387SGreg Roach * @return string 26069219296aSGreg Roach */ 26079219296aSGreg Roach public function serverTime(): string 26089219296aSGreg Roach { 2609f78da678SGreg Roach return $this->server_repository->serverTime(); 26109219296aSGreg Roach } 26119219296aSGreg Roach 26129219296aSGreg Roach /** 26130dcd9387SGreg Roach * @return string 26149219296aSGreg Roach */ 26159219296aSGreg Roach public function serverTime24(): string 26169219296aSGreg Roach { 2617f78da678SGreg Roach return $this->server_repository->serverTime24(); 26189219296aSGreg Roach } 26199219296aSGreg Roach 26209219296aSGreg Roach /** 26219219296aSGreg Roach * What is the timezone of the server. 26229219296aSGreg Roach * 26239219296aSGreg Roach * @return string 26249219296aSGreg Roach */ 26259219296aSGreg Roach public function serverTimezone(): string 26269219296aSGreg Roach { 2627f78da678SGreg Roach return $this->server_repository->serverTimezone(); 26289219296aSGreg Roach } 26299219296aSGreg Roach 26309219296aSGreg Roach /** 26310dcd9387SGreg Roach * @return string 26329219296aSGreg Roach */ 26339219296aSGreg Roach public function browserDate(): string 26349219296aSGreg Roach { 2635f78da678SGreg Roach return $this->browser_repository->browserDate(); 26369219296aSGreg Roach } 26379219296aSGreg Roach 26389219296aSGreg Roach /** 26390dcd9387SGreg Roach * @return string 26409219296aSGreg Roach */ 26419219296aSGreg Roach public function browserTime(): string 26429219296aSGreg Roach { 2643f78da678SGreg Roach return $this->browser_repository->browserTime(); 26449219296aSGreg Roach } 26459219296aSGreg Roach 26469219296aSGreg Roach /** 26470dcd9387SGreg Roach * @return string 26489219296aSGreg Roach */ 26499219296aSGreg Roach public function browserTimezone(): string 26509219296aSGreg Roach { 2651f78da678SGreg Roach return $this->browser_repository->browserTimezone(); 26529219296aSGreg Roach } 26539219296aSGreg Roach 26549219296aSGreg Roach /** 26550dcd9387SGreg Roach * @param string $page_parameter 26560dcd9387SGreg Roach * 26570dcd9387SGreg Roach * @return string 26589219296aSGreg Roach */ 26599219296aSGreg Roach public function hitCount(string $page_parameter = ''): string 26609219296aSGreg Roach { 2661f78da678SGreg Roach return $this->hit_count_repository->hitCount($page_parameter); 26629219296aSGreg Roach } 26639219296aSGreg Roach 26649219296aSGreg Roach /** 26650dcd9387SGreg Roach * @param string $page_parameter 26660dcd9387SGreg Roach * 26670dcd9387SGreg Roach * @return string 26689219296aSGreg Roach */ 26699219296aSGreg Roach public function hitCountUser(string $page_parameter = ''): string 26709219296aSGreg Roach { 2671f78da678SGreg Roach return $this->hit_count_repository->hitCountUser($page_parameter); 26729219296aSGreg Roach } 26739219296aSGreg Roach 26749219296aSGreg Roach /** 26750dcd9387SGreg Roach * @param string $page_parameter 26760dcd9387SGreg Roach * 26770dcd9387SGreg Roach * @return string 26789219296aSGreg Roach */ 26799219296aSGreg Roach public function hitCountIndi(string $page_parameter = ''): string 26809219296aSGreg Roach { 2681f78da678SGreg Roach return $this->hit_count_repository->hitCountIndi($page_parameter); 26829219296aSGreg Roach } 26839219296aSGreg Roach 26849219296aSGreg Roach /** 26850dcd9387SGreg Roach * @param string $page_parameter 26860dcd9387SGreg Roach * 26870dcd9387SGreg Roach * @return string 26889219296aSGreg Roach */ 26899219296aSGreg Roach public function hitCountFam(string $page_parameter = ''): string 26909219296aSGreg Roach { 2691f78da678SGreg Roach return $this->hit_count_repository->hitCountFam($page_parameter); 26929219296aSGreg Roach } 26939219296aSGreg Roach 26949219296aSGreg Roach /** 26950dcd9387SGreg Roach * @param string $page_parameter 26960dcd9387SGreg Roach * 26970dcd9387SGreg Roach * @return string 26989219296aSGreg Roach */ 26999219296aSGreg Roach public function hitCountSour(string $page_parameter = ''): string 27009219296aSGreg Roach { 2701f78da678SGreg Roach return $this->hit_count_repository->hitCountSour($page_parameter); 27029219296aSGreg Roach } 27039219296aSGreg Roach 27049219296aSGreg Roach /** 27050dcd9387SGreg Roach * @param string $page_parameter 27060dcd9387SGreg Roach * 27070dcd9387SGreg Roach * @return string 27089219296aSGreg Roach */ 27099219296aSGreg Roach public function hitCountRepo(string $page_parameter = ''): string 27109219296aSGreg Roach { 2711f78da678SGreg Roach return $this->hit_count_repository->hitCountRepo($page_parameter); 27129219296aSGreg Roach } 27139219296aSGreg Roach 27149219296aSGreg Roach /** 27150dcd9387SGreg Roach * @param string $page_parameter 27160dcd9387SGreg Roach * 27170dcd9387SGreg Roach * @return string 27189219296aSGreg Roach */ 27199219296aSGreg Roach public function hitCountNote(string $page_parameter = ''): string 27209219296aSGreg Roach { 2721f78da678SGreg Roach return $this->hit_count_repository->hitCountNote($page_parameter); 27229219296aSGreg Roach } 27239219296aSGreg Roach 27249219296aSGreg Roach /** 27250dcd9387SGreg Roach * @param string $page_parameter 27260dcd9387SGreg Roach * 27270dcd9387SGreg Roach * @return string 27289219296aSGreg Roach */ 27299219296aSGreg Roach public function hitCountObje(string $page_parameter = ''): string 27309219296aSGreg Roach { 2731f78da678SGreg Roach return $this->hit_count_repository->hitCountObje($page_parameter); 27329219296aSGreg Roach } 27339219296aSGreg Roach 27349219296aSGreg Roach /** 27350dcd9387SGreg Roach * @return string 27369219296aSGreg Roach */ 27379219296aSGreg Roach public function gedcomFavorites(): string 27389219296aSGreg Roach { 2739f78da678SGreg Roach return $this->favorites_repository->gedcomFavorites(); 27409219296aSGreg Roach } 27419219296aSGreg Roach 27429219296aSGreg Roach /** 27430dcd9387SGreg Roach * @return string 27449219296aSGreg Roach */ 27459219296aSGreg Roach public function userFavorites(): string 27469219296aSGreg Roach { 2747f78da678SGreg Roach return $this->favorites_repository->userFavorites(); 27489219296aSGreg Roach } 27499219296aSGreg Roach 27509219296aSGreg Roach /** 27510dcd9387SGreg Roach * @return string 27529219296aSGreg Roach */ 27539219296aSGreg Roach public function totalGedcomFavorites(): string 27549219296aSGreg Roach { 2755f78da678SGreg Roach return $this->favorites_repository->totalGedcomFavorites(); 27569219296aSGreg Roach } 27579219296aSGreg Roach 27589219296aSGreg Roach /** 27590dcd9387SGreg Roach * @return string 27609219296aSGreg Roach */ 27619219296aSGreg Roach public function totalUserFavorites(): string 27629219296aSGreg Roach { 2763f78da678SGreg Roach return $this->favorites_repository->totalUserFavorites(); 27649219296aSGreg Roach } 27659219296aSGreg Roach 27669219296aSGreg Roach /** 27670dcd9387SGreg Roach * @return string 27689219296aSGreg Roach */ 27699219296aSGreg Roach public function totalUserMessages(): string 27709219296aSGreg Roach { 2771f78da678SGreg Roach return $this->message_repository->totalUserMessages(); 27729219296aSGreg Roach } 27739219296aSGreg Roach 27749219296aSGreg Roach /** 27750dcd9387SGreg Roach * @return string 27769219296aSGreg Roach */ 27779219296aSGreg Roach public function totalUserJournal(): string 27789219296aSGreg Roach { 2779f78da678SGreg Roach return $this->news_repository->totalUserJournal(); 27809219296aSGreg Roach } 27819219296aSGreg Roach 27829219296aSGreg Roach /** 27830dcd9387SGreg Roach * @return string 27849219296aSGreg Roach */ 27859219296aSGreg Roach public function totalGedcomNews(): string 27869219296aSGreg Roach { 2787f78da678SGreg Roach return $this->news_repository->totalGedcomNews(); 27889219296aSGreg Roach } 27899219296aSGreg Roach 27909219296aSGreg Roach /** 27919219296aSGreg Roach * Create any of the other blocks. 27929219296aSGreg Roach * Use as #callBlock:block_name# 27939219296aSGreg Roach * 27949219296aSGreg Roach * @param string $block 27959219296aSGreg Roach * @param string ...$params 27969219296aSGreg Roach * 2797e364afe4SGreg Roach * @return string|null 27989219296aSGreg Roach */ 2799*1ff45046SGreg Roach public function callBlock(string $block = '', ...$params): string|null 28009219296aSGreg Roach { 280187cca37cSGreg Roach /** @var ModuleBlockInterface|null $module */ 2802fd9aba47SGreg Roach $module = $this->module_service 280387cca37cSGreg Roach ->findByComponent(ModuleBlockInterface::class, $this->tree, Auth::user()) 2804f25fc0f9SGreg Roach ->first(static fn(ModuleInterface $module): bool => $module->name() === $block && $module->name() !== 'html'); 28059219296aSGreg Roach 28069219296aSGreg Roach if ($module === null) { 28079219296aSGreg Roach return ''; 28089219296aSGreg Roach } 28099219296aSGreg Roach 28109219296aSGreg Roach // Build the config array 28119219296aSGreg Roach $cfg = []; 28129219296aSGreg Roach foreach ($params as $config) { 28139219296aSGreg Roach $bits = explode('=', $config); 28149219296aSGreg Roach 28156ccdf4f0SGreg Roach if (count($bits) < 2) { 28169219296aSGreg Roach continue; 28179219296aSGreg Roach } 28189219296aSGreg Roach 28199219296aSGreg Roach $v = array_shift($bits); 28209219296aSGreg Roach $cfg[$v] = implode('=', $bits); 28219219296aSGreg Roach } 28229219296aSGreg Roach 28233caaa4d2SGreg Roach return $module->getBlock($this->tree, 0, ModuleBlockInterface::CONTEXT_EMBED, $cfg); 28249219296aSGreg Roach } 28259219296aSGreg Roach 28269219296aSGreg Roach /** 28279219296aSGreg Roach * What is the current version of webtrees. 28289219296aSGreg Roach * 28299219296aSGreg Roach * @return string 28309219296aSGreg Roach */ 28319219296aSGreg Roach public function webtreesVersion(): string 28329219296aSGreg Roach { 28339219296aSGreg Roach return Webtrees::VERSION; 28349219296aSGreg Roach } 283571378461SGreg Roach 283671378461SGreg Roach /** 283771378461SGreg Roach * Get tags and their parsed results. 283871378461SGreg Roach * 283971378461SGreg Roach * @param string $text 284071378461SGreg Roach * 284124f2a3afSGreg Roach * @return array<string> 284271378461SGreg Roach */ 284371378461SGreg Roach private function getTags(string $text): array 284471378461SGreg Roach { 284571378461SGreg Roach $tags = []; 284671378461SGreg Roach $matches = []; 284771378461SGreg Roach 2848b25599e6SGreg Roach preg_match_all('/#([^#\n]+)(?=#)/', $text, $matches, PREG_SET_ORDER); 284971378461SGreg Roach 285071378461SGreg Roach foreach ($matches as $match) { 285171378461SGreg Roach $params = explode(':', $match[1]); 285271378461SGreg Roach $method = array_shift($params); 285371378461SGreg Roach 285471378461SGreg Roach if (method_exists($this, $method)) { 285576d39c55SGreg Roach $tags[$match[0] . '#'] = $this->$method(...$params); 285671378461SGreg Roach } 285771378461SGreg Roach } 285871378461SGreg Roach 285971378461SGreg Roach return $tags; 286071378461SGreg Roach } 28619219296aSGreg Roach} 2862