1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-13 23:54:03 +00:00

Domain model & resolver test

This commit is contained in:
Samuel Štancl 2020-05-08 18:16:18 +02:00
parent 08ed5084d5
commit e1a4054743
11 changed files with 158 additions and 8 deletions

6
src/Contracts/Tenant.php Normal file
View file

@ -0,0 +1,6 @@
<?php
namespace Stancl\Tenancy\Contracts;
interface Tenant
{}

View file

@ -0,0 +1,9 @@
<?php
namespace Stancl\Tenancy\Contracts;
use Exception;
abstract class TenantCouldNotBeIdentifiedException extends Exception
{
}

View file

@ -0,0 +1,13 @@
<?php
namespace Stancl\Tenancy\Contracts;
interface TenantResolver
{
/**
* Resolve a tenant using some value.
*
* @throws TenantCouldNotBeIdentifiedException
*/
public function resolve(...$args): Tenant;
}