2017-10-01 00:23:44 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Pterodactyl - Panel
|
|
|
|
* Copyright (c) 2015 - 2017 Dane Everitt <dane@daneeveritt.com>.
|
|
|
|
*
|
|
|
|
* This software is licensed under the terms of the MIT license.
|
|
|
|
* https://opensource.org/licenses/MIT
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Pterodactyl\Repositories\Wings;
|
|
|
|
|
2017-10-09 01:57:59 +00:00
|
|
|
use Psr\Http\Message\ResponseInterface;
|
2017-10-01 00:23:44 +00:00
|
|
|
use Pterodactyl\Exceptions\PterodactylException;
|
|
|
|
use Pterodactyl\Contracts\Repository\Daemon\ServerRepositoryInterface;
|
|
|
|
|
|
|
|
class ServerRepository extends BaseRepository implements ServerRepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
2017-10-09 01:57:59 +00:00
|
|
|
public function create(array $structure, array $overrides = []): ResponseInterface
|
2017-10-01 00:23:44 +00:00
|
|
|
{
|
|
|
|
throw new PterodactylException('This feature is not yet implemented.');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function update(array $data)
|
|
|
|
{
|
|
|
|
throw new PterodactylException('This feature is not yet implemented.');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function reinstall($data = null)
|
|
|
|
{
|
|
|
|
throw new PterodactylException('This feature is not yet implemented.');
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function rebuild()
|
|
|
|
{
|
2017-10-01 02:00:24 +00:00
|
|
|
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/rebuild');
|
2017-10-01 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function suspend()
|
|
|
|
{
|
2017-10-01 02:00:24 +00:00
|
|
|
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/suspend');
|
2017-10-01 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function unsuspend()
|
|
|
|
{
|
2017-10-01 02:00:24 +00:00
|
|
|
return $this->getHttpClient()->request('POST', 'server/' . $this->getAccessServer() . '/unsuspend');
|
2017-10-01 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function delete()
|
|
|
|
{
|
2017-10-01 02:00:24 +00:00
|
|
|
return $this->getHttpClient()->request('DELETE', 'server/' . $this->getAccessServer());
|
2017-10-01 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function details()
|
|
|
|
{
|
2017-10-01 02:00:24 +00:00
|
|
|
return $this->getHttpClient()->request('GET', 'server/' . $this->getAccessServer());
|
2017-10-01 00:23:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* {@inheritdoc}
|
|
|
|
*/
|
|
|
|
public function revokeAccessKey($key)
|
|
|
|
{
|
|
|
|
throw new PterodactylException('This feature is not yet implemented.');
|
|
|
|
}
|
|
|
|
}
|