2020-04-04 03:45:37 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Services\Servers;
|
|
|
|
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
use Pterodactyl\Repositories\Wings\DaemonServerRepository;
|
|
|
|
|
|
|
|
class TransferService
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @var \Pterodactyl\Repositories\Wings\DaemonServerRepository
|
|
|
|
*/
|
|
|
|
private $daemonServerRepository;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* TransferService constructor.
|
|
|
|
*/
|
2021-10-30 20:41:38 +00:00
|
|
|
public function __construct(DaemonServerRepository $daemonServerRepository)
|
|
|
|
{
|
2020-04-04 03:45:37 +00:00
|
|
|
$this->daemonServerRepository = $daemonServerRepository;
|
|
|
|
}
|
|
|
|
|
2020-04-04 06:50:06 +00:00
|
|
|
/**
|
|
|
|
* Requests an archive from the daemon.
|
|
|
|
*
|
|
|
|
* @throws \Throwable
|
|
|
|
*/
|
|
|
|
public function requestArchive(Server $server)
|
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
|
|
|
}
|
|
|
|
}
|