mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
Improve get()
This commit is contained in:
parent
2fe464a1f9
commit
1216addd1f
1 changed files with 5 additions and 1 deletions
|
|
@ -273,6 +273,10 @@ final class TenantManager
|
||||||
{
|
{
|
||||||
$uuid = $uuid ?: $this->tenant['uuid'];
|
$uuid = $uuid ?: $this->tenant['uuid'];
|
||||||
|
|
||||||
|
if (isset($this->tenant['uuid']) && $uuid === $this->tenant['uuid'] && isset($this->tenant[$key])) {
|
||||||
|
return $this->tenant[$key];
|
||||||
|
}
|
||||||
|
|
||||||
if (\is_array($key)) {
|
if (\is_array($key)) {
|
||||||
return $this->jsonDecodeArrayValues($this->storage->getMany($uuid, $key));
|
return $this->jsonDecodeArrayValues($this->storage->getMany($uuid, $key));
|
||||||
}
|
}
|
||||||
|
|
@ -372,6 +376,6 @@ final class TenantManager
|
||||||
return $this->tenant;
|
return $this->tenant;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->tenant[(string) $attribute];
|
return $this->get((string) $attribute);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue