|
@ -3,7 +3,8 @@ |
|
|
namespace Darksparrow\DeegraphPHP\Core; |
|
|
namespace Darksparrow\DeegraphPHP\Core; |
|
|
|
|
|
|
|
|
use Darksparrow\DeegraphPHP\DataStructures\ServerInfo; |
|
|
use Darksparrow\DeegraphPHP\DataStructures\ServerInfo; |
|
|
use Darksparrow\DeegraphPHP\QueryBuilder\QueryBuilders\Put; |
|
|
use Darksparrow\DeegraphPHP\QueryBuilder\QueryBuilders\InsertQuery; |
|
|
|
|
|
use Darksparrow\DeegraphPHP\QueryBuilder\QueryBuilders\PutQuery; |
|
|
|
|
|
|
|
|
class DeegraphServer |
|
|
class DeegraphServer |
|
|
{ |
|
|
{ |
|
@ -12,7 +13,11 @@ class DeegraphServer |
|
|
private string $Token; |
|
|
private string $Token; |
|
|
private bool $AllowSelfSignedCerts; |
|
|
private bool $AllowSelfSignedCerts; |
|
|
|
|
|
|
|
|
public function __construct(string $server, int $port, string $token, bool $allowSelfSignedCerts = false) |
|
|
public function __construct( |
|
|
|
|
|
string $token, |
|
|
|
|
|
string $server = "localhost", |
|
|
|
|
|
int $port = 8088, |
|
|
|
|
|
bool $allowSelfSignedCerts = false) |
|
|
{ |
|
|
{ |
|
|
$this->ServerDomain = $server; |
|
|
$this->ServerDomain = $server; |
|
|
$this->Port = $port; |
|
|
$this->Port = $port; |
|
@ -62,10 +67,10 @@ class DeegraphServer |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @param Put $query Takes in a Query Builder object. |
|
|
* @param PutQuery|InsertQuery $query Takes in a Query Builder object. |
|
|
* @return void |
|
|
* @return void |
|
|
*/ |
|
|
*/ |
|
|
public function RunQuery(Put $query): void |
|
|
public function RunQuery(PutQuery|InsertQuery $query): void |
|
|
{ |
|
|
{ |
|
|
echo $query; |
|
|
echo $query; |
|
|
echo "<br><br><br>"; |
|
|
echo "<br><br><br>"; |
|
|