2020-04-26 16:07:36 -07:00
|
|
|
<?php
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
2020-04-26 16:07:36 -07:00
|
|
|
namespace Pterodactyl\Providers;
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
use Illuminate\Contracts\Support\DeferrableProvider;
|
|
|
|
|
use Illuminate\Foundation\Application;
|
2020-04-26 16:07:36 -07:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
use Pterodactyl\Extensions\Backups\BackupManager;
|
|
|
|
|
|
|
|
|
|
class BackupsServiceProvider extends ServiceProvider implements DeferrableProvider
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* Register the S3 backup disk.
|
|
|
|
|
*/
|
2023-02-23 12:30:16 -07:00
|
|
|
public function register(): void
|
2020-04-26 16:07:36 -07:00
|
|
|
{
|
2026-10-05 18:10:18 -04:00
|
|
|
$this->app->singleton(BackupManager::class, fn (Application $app): BackupManager => new BackupManager($app));
|
2020-04-26 16:07:36 -07:00
|
|
|
}
|
|
|
|
|
|
2026-10-05 18:10:18 -04:00
|
|
|
/**
|
|
|
|
|
* @return list<string>
|
|
|
|
|
*/
|
2022-10-14 10:59:20 -06:00
|
|
|
public function provides(): array
|
2020-04-26 16:07:36 -07:00
|
|
|
{
|
|
|
|
|
return [BackupManager::class];
|
|
|
|
|
}
|
|
|
|
|
}
|