2017-07-20 01:49:41 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Pterodactyl\Contracts\Repository\Daemon;
|
|
|
|
|
2018-01-06 00:27:47 +00:00
|
|
|
use GuzzleHttp\Client;
|
|
|
|
use Pterodactyl\Models\Node;
|
|
|
|
use Pterodactyl\Models\Server;
|
|
|
|
|
2019-09-06 03:33:27 +00:00
|
|
|
/**
|
|
|
|
* @deprecated
|
|
|
|
*/
|
2017-07-20 01:49:41 +00:00
|
|
|
interface BaseRepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Set the node model to be used for this daemon connection.
|
|
|
|
*
|
2018-01-06 00:27:47 +00:00
|
|
|
* @param \Pterodactyl\Models\Node $node
|
2017-07-20 01:49:41 +00:00
|
|
|
* @return $this
|
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function setNode(Node $node);
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the node model being used.
|
|
|
|
*
|
2018-01-06 00:44:20 +00:00
|
|
|
* @return \Pterodactyl\Models\Node|null
|
2017-07-20 01:49:41 +00:00
|
|
|
*/
|
2018-01-06 00:44:20 +00:00
|
|
|
public function getNode();
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-06 00:27:47 +00:00
|
|
|
* Set the Server model to use when requesting information from the Daemon.
|
2017-07-20 01:49:41 +00:00
|
|
|
*
|
2018-01-06 00:27:47 +00:00
|
|
|
* @param \Pterodactyl\Models\Server $server
|
2017-07-20 01:49:41 +00:00
|
|
|
* @return $this
|
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function setServer(Server $server);
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
2018-01-06 00:27:47 +00:00
|
|
|
* Return the Server model.
|
2017-07-20 01:49:41 +00:00
|
|
|
*
|
2018-01-06 00:27:47 +00:00
|
|
|
* @return \Pterodactyl\Models\Server|null
|
2017-07-20 01:49:41 +00:00
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function getServer();
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set the token to be used in the X-Access-Token header for requests to the daemon.
|
|
|
|
*
|
2018-01-06 00:27:47 +00:00
|
|
|
* @param string $token
|
2017-07-20 01:49:41 +00:00
|
|
|
* @return $this
|
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function setToken(string $token);
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the access token being used for requests.
|
|
|
|
*
|
2018-01-06 00:27:47 +00:00
|
|
|
* @return string|null
|
2017-07-20 01:49:41 +00:00
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function getToken();
|
2017-07-20 01:49:41 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Return an instance of the Guzzle HTTP Client to be used for requests.
|
|
|
|
*
|
2017-08-22 03:10:48 +00:00
|
|
|
* @param array $headers
|
2017-07-20 01:49:41 +00:00
|
|
|
* @return \GuzzleHttp\Client
|
2018-01-06 00:27:47 +00:00
|
|
|
*
|
|
|
|
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
2017-07-20 01:49:41 +00:00
|
|
|
*/
|
2018-01-06 00:27:47 +00:00
|
|
|
public function getHttpClient(array $headers = []): Client;
|
2017-07-20 01:49:41 +00:00
|
|
|
}
|