mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 12:54:05 +00:00
[breaking fix] Add array return types to StorageDriver interface
This commit is contained in:
parent
e1c4dc8934
commit
9bc9b92d8d
2 changed files with 3 additions and 3 deletions
|
|
@ -11,7 +11,7 @@ interface StorageDriver
|
|||
public function createTenant(string $domain, string $uuid): array;
|
||||
public function deleteTenant(string $uuid): bool;
|
||||
public function get(string $uuid, string $key);
|
||||
public function getMany(string $uuid, array $keys);
|
||||
public function put(string $uuid, string $key, $value);
|
||||
public function getMany(string $uuid, array $keys): array;
|
||||
public function put(string $uuid, string $key, $value): array;
|
||||
public function putMany(string $uuid, array $values); // todo better argument name than "values" for kv pairs?
|
||||
}
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class TenantManager
|
|||
throw new \Exception("Domain $domain is already occupied by tenant $id.");
|
||||
}
|
||||
|
||||
$tenant = $this->jsonDecodeArrayValues($this->storage->createTenant($domain, \Webpatser\Uuid\Uuid::generate(1, $domain)));
|
||||
$tenant = $this->jsonDecodeArrayValues($this->storage->createTenant($domain, (string) \Webpatser\Uuid\Uuid::generate(1, $domain)));
|
||||
$this->database->create($this->getDatabaseName($tenant));
|
||||
|
||||
return $tenant;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue