@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace App\Support;
|
||||
|
||||
final class TenantContext
|
||||
{
|
||||
private ?int $tenantId = null;
|
||||
|
||||
public function set(?int $tenantId): void
|
||||
{
|
||||
$this->tenantId = $tenantId;
|
||||
}
|
||||
|
||||
public function id(): ?int
|
||||
{
|
||||
return $this->tenantId;
|
||||
}
|
||||
|
||||
public function clear(): void
|
||||
{
|
||||
$this->tenantId = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user