. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Elements; use function strtoupper; /** * ROMANIZED_TYPE := {Size=5:30} * [ | pinyin | romaji | wadegiles] * Indicates the method used in transforming the text to a romanized variation. */ class RomanizedType extends AbstractElement { protected const MAXIMUM_LENGTH = 30; /** * Convert a value to a canonical form. * * @param string $value * * @return string */ public function canonical(string $value): string { return strtoupper(parent::canonical($value)); } /** * A list of controlled values for this element * * @return array */ public function values(): array { return [ '' => '', 'ELOT 743' => 'ELOT 743', 'PINYIN' => 'pinyin', 'ROMAJI' => 'romaji', 'WADEGILES' => 'wadegiles', ]; } }