1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 09:24:03 +00:00

Interfaces -> Contracts

This commit is contained in:
Samuel Štancl 2019-09-05 19:25:32 +02:00
parent e4f27e7396
commit 89bf90f595
4 changed files with 81 additions and 0 deletions

View file

@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts;
interface StorageDriver
{
public function identifyTenant(string $domain): array;
/** @return array[] */
public function getAllTenants(array $uuids = []): array;
public function getTenantById(string $uuid, array $fields = []): array;
public function getTenantIdByDomain(string $domain): ?string;
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): array;
public function put(string $uuid, string $key, $value);
public function putMany(string $uuid, array $values): array;
}