. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Contracts; use Fisharebest\Webtrees\Encodings\EncodingInterface; /** * Create an encoding object. */ interface EncodingFactoryInterface { /** * Detect an encoding from a GEDCOM header record. * * @param string $header * * @return EncodingInterface|null */ public function detect(string $header): ?EncodingInterface; /** * Create a named encoding. * * @param string $name * * @return EncodingInterface */ public function make(string $name): EncodingInterface; /** * A list of supported encodings and their names. * * @return array */ public function list(): array; }