Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

697 B
Raw Blame
<?php

namespace App\Support\DatabaseImport;

use InvalidArgumentException;

readonly class DatabaseImportSource
{
    public function __construct(
        public string $type,
        public ?string $uploadId = null,
        public ?string $path = null,
        public ?string $s3StorageUuid = null,
        public bool $dumpAll = false,
        public bool $replaceExisting = false,
        public bool $keepOwners = false,
        public ?string $sqliteDatabase = null,
        public bool $restoreMysqlUsers = false,
    ) {
        if (! in_array($type, ['upload', 's3', 'server'], true)) {
            throw new InvalidArgumentException('Invalid database import source.');
        }
    }
}