. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use Fisharebest\Webtrees\Tree; use function e; use function strtoupper; /** * ANCESTRAL_FILE_NUMBER := {Size=1:12} * A unique permanent record number of an individual record contained in the * Family History Department's Ancestral File. */ class AncestralFileNumber extends AbstractElement { protected const MAX_LENGTH = 12; /** * Convert a value to a canonical form. * * @param string $value * * @return string */ public function canonical(string $value): string { return strtoupper(parent::canonical($value)); } /** * Display the value of this type of element. * * @param string $value * @param Tree $tree * * @return string */ public function value(string $value, Tree $tree): string { return '' . e($this->canonical($value)) . ''; } }