1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 23:54:03 +00:00
tenancy/src/Contracts/StorageDriver.php
Samuel Štancl 39503fe76b Docblocks
2019-09-08 11:41:34 +02:00

31 lines
726 B
PHP

<?php
declare(strict_types=1);
namespace Stancl\Tenancy\Contracts;
use Stancl\Tenancy\Tenant;
use Stancl\Tenancy\Exceptions\TenantCouldNotBeIdentifiedException;
interface StorageDriver
{
public function createTenant(Tenant $tenant): bool; // todo return type
public function updateTenant(Tenant $tenant): bool; // todo return type
/**
* Find a tenant using an id.
*
* @param string $id
* @return Tenant
* @throws TenantCouldNotBeIdentifiedException
*/
public function findById(string $id): Tenant;
/**
* Find a tenant using a domain name.
*
* @param string $domain
* @return Tenant
*/
public function findByDomain(string $domain): Tenant;
}