mirror of
https://github.com/envoyr/php-froxlor-client.git
synced 2026-04-28 12:24:08 +00:00
@@ -5,15 +5,15 @@ namespace Envoyr\Froxlor;
|
||||
class Database
|
||||
{
|
||||
public array $attributes;
|
||||
public string $dbname;
|
||||
public string $id;
|
||||
public Customer $customer;
|
||||
|
||||
public function __construct(Customer $customer, string $dbname)
|
||||
public function __construct(Customer $customer, string $id)
|
||||
{
|
||||
$this->customer = $customer;
|
||||
$this->dbname = $dbname;
|
||||
$this->id = $id;
|
||||
$this->attributes = $this->customer->server->request('Mysqls.get', [
|
||||
'dbname' => $this->dbname
|
||||
'id' => $this->id
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ class Database
|
||||
return $this->customer->server->request(
|
||||
'Mysqls.update',
|
||||
array_merge($attributes, [
|
||||
'loginname' => $this->customer->loginname,
|
||||
'dbname' => $this->dbname,
|
||||
'customerid' => $this->customer->id,
|
||||
'id' => $this->id,
|
||||
])
|
||||
);
|
||||
}
|
||||
@@ -31,8 +31,8 @@ class Database
|
||||
public function delete(): array
|
||||
{
|
||||
return $this->customer->server->request('Mysqls.delete', [
|
||||
'loginname' => $this->customer->loginname,
|
||||
'dbname' => $this->dbname
|
||||
'customerid' => $this->customer->id,
|
||||
'id' => $this->id
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user