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:
parent
08ed5084d5
commit
e1a4054743
11 changed files with 158 additions and 8 deletions
6
src/Contracts/Tenant.php
Normal file
6
src/Contracts/Tenant.php
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Contracts;
|
||||
|
||||
interface Tenant
|
||||
{}
|
||||
9
src/Contracts/TenantCouldNotBeIdentifiedException.php
Normal file
9
src/Contracts/TenantCouldNotBeIdentifiedException.php
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace Stancl\Tenancy\Contracts;
|
||||
|
||||
use Exception;
|
||||
|
||||
abstract class TenantCouldNotBeIdentifiedException extends Exception
|
||||
{
|
||||
}
|
||||
13
src/Contracts/TenantResolver.php
Normal file
13
src/Contracts/TenantResolver.php
Normal 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;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue