|
|
@ -3,7 +3,8 @@ |
|
|
|
namespace Darksparrow\DeegraphPHP\Core; |
|
|
|
|
|
|
|
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 |
|
|
|
{ |
|
|
@ -12,7 +13,11 @@ class DeegraphServer |
|
|
|
private string $Token; |
|
|
|
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->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 |
|
|
|
*/ |
|
|
|
public function RunQuery(Put $query): void |
|
|
|
public function RunQuery(PutQuery|InsertQuery $query): void |
|
|
|
{ |
|
|
|
echo $query; |
|
|
|
echo "<br><br><br>"; |
|
|
|