xref: /webtrees/app/Elements/FamilySearchFamilyTreeId.php (revision f69381869b841e429cc1ff31b9b868f8edc2d88a)
132a5d3c7SGreg Roach<?php
232a5d3c7SGreg Roach
332a5d3c7SGreg Roach/**
432a5d3c7SGreg Roach * webtrees: online genealogy
532a5d3c7SGreg Roach * Copyright (C) 2021 webtrees development team
632a5d3c7SGreg Roach * This program is free software: you can redistribute it and/or modify
732a5d3c7SGreg Roach * it under the terms of the GNU General Public License as published by
832a5d3c7SGreg Roach * the Free Software Foundation, either version 3 of the License, or
932a5d3c7SGreg Roach * (at your option) any later version.
1032a5d3c7SGreg Roach * This program is distributed in the hope that it will be useful,
1132a5d3c7SGreg Roach * but WITHOUT ANY WARRANTY; without even the implied warranty of
1232a5d3c7SGreg Roach * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1332a5d3c7SGreg Roach * GNU General Public License for more details.
1432a5d3c7SGreg Roach * You should have received a copy of the GNU General Public License
1532a5d3c7SGreg Roach * along with this program. If not, see <https://www.gnu.org/licenses/>.
1632a5d3c7SGreg Roach */
1732a5d3c7SGreg Roach
1832a5d3c7SGreg Roachdeclare(strict_types=1);
1932a5d3c7SGreg Roach
2032a5d3c7SGreg Roachnamespace Fisharebest\Webtrees\Elements;
2132a5d3c7SGreg Roach
2232a5d3c7SGreg Roachuse function strtoupper;
2332a5d3c7SGreg Roach
2432a5d3c7SGreg Roach/**
2532a5d3c7SGreg Roach * ANCESTRAL_FILE_NUMBER := {Size=1:12}
2632a5d3c7SGreg Roach * A unique permanent record number of an individual record contained in the
2732a5d3c7SGreg Roach * Family History Department's Ancestral File.
2832a5d3c7SGreg Roach */
2932a5d3c7SGreg Roachclass FamilySearchFamilyTreeId extends AbstractExternalLink
3032a5d3c7SGreg Roach{
31*f6938186SRichard Cissée    protected const EXTERNAL_URL = 'https://www.familysearch.org/tree/person/details/{ID}';
3232a5d3c7SGreg Roach
3332a5d3c7SGreg Roach    protected const MAXIMUM_LENGTH = 8;
3432a5d3c7SGreg Roach
3532a5d3c7SGreg Roach    /**
3632a5d3c7SGreg Roach     * Convert a value to a canonical form.
3732a5d3c7SGreg Roach     *
3832a5d3c7SGreg Roach     * @param string $value
3932a5d3c7SGreg Roach     *
4032a5d3c7SGreg Roach     * @return string
4132a5d3c7SGreg Roach     */
4232a5d3c7SGreg Roach    public function canonical(string $value): string
4332a5d3c7SGreg Roach    {
4432a5d3c7SGreg Roach        return strtoupper(parent::canonical($value));
4532a5d3c7SGreg Roach    }
4632a5d3c7SGreg Roach}
47