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

WIP TenantManager

This commit is contained in:
Samuel Štancl 2019-09-04 20:25:44 +02:00
parent 96e8dec5eb
commit 696cc8ba9a
2 changed files with 25 additions and 1 deletions

View file

@ -4,10 +4,12 @@ declare(strict_types=1);
namespace Stancl\Tenancy;
// todo laravel events instead of custom events?
/**
* @final Class is subject to breaking changes in minor and patch versions.
*/
final class Tenant
final class Tenant // todo implement an interface to allow for current tenant dependency injection
{
// todo specify id in data

22
src/TenantManagerv2.php Normal file
View file

@ -0,0 +1,22 @@
<?php
declare(strict_types=1);
namespace Stancl\Tenancy;
final class TenantManager
{
public function addTenant(Tenant $tenant): self
{
$this->storage->addTenant($tenant);
return $this;
}
public function updateTenant(Tenant $tenant): self
{
$this->storage->updateTenant($tenant);
return $this;
}
}