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

path identification wip

This commit is contained in:
Samuel Štancl 2020-05-09 03:56:41 +02:00
parent 7ad93adde5
commit 5e6d82be57
8 changed files with 215 additions and 3 deletions

View file

@ -13,15 +13,22 @@ class Tenancy
/** @var callable|null */
public static $getBootstrappers = null;
/** @var bool */
public $initialized = false;
public function initialize(Tenant $tenant): void
{
$this->tenant = $tenant;
$this->initialized = true;
event(new Events\TenancyInitialized($tenant));
}
public function end(): void
{
$this->initialized = false;
event(new Events\TenancyEnded($this->tenant));
$this->tenant = null;