2020-04-04 03:45:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Services\Servers;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
|
|
|
|
|
|
|
class TransferService
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* TransferService constructor.
|
|
|
|
*/
|
|
|
|
public function __construct(
|
2022-10-14 16:59:20 +00:00
|
|
|
private DaemonServerRepository $daemonServerRepository
|
2020-04-04 03:45:37 +00:00
|
|
|
) {
|
|
|
|
}
|
|
|
|
|
2020-04-04 06:50:06 +00:00
|
|
|
/**
|
|
|
|
* Requests an archive from the daemon.
|
|
|
|
*
|
2022-10-14 16:59:20 +00:00
|
|
|
* @throws \Pterodactyl\Exceptions\Http\Connection\DaemonConnectionException
|
2020-04-04 06:50:06 +00:00
|
|
|
*/
|
2022-10-14 16:59:20 +00:00
|
|
|
public function requestArchive(Server $server): void
|
2020-04-04 03:45:37 +00:00
|
|
|
{
|
2020-04-04 06:50:06 +00:00
|
|
|
$this->daemonServerRepository->setServer($server)->requestArchive();
|
2020-04-04 03:45:37 +00:00
|
|
|
}
|
|
|
|
}
|