Vendor/phpspreadsheet/phpoffice/phpspreadsheet/src/PhpSpreadsheet/IOFactory.php
public static function registerWriter($writerType, $writerClass)
    {
        if (!is_a($writerClass, Writer\IWriter::class, true)) {
            throw new Writer\Exception('Registered writers must implement ' . Writer\IWriter::class);
        }

        self::$writers[$writerType] = $writerClass;
    }
public static function registerWriter($writerType, $writerClass)
    {
        if (!is_a($writerClass, Writer\IWriter::class, true)) {
            throw new Writer\Exception('Registered writers must implement ' . Writer\IWriter::class);
        }

        self::$writers[$writerType] = $writerClass;
    }
Register a writer with its type and class name.

@param string $writerType
@param string $writerClass