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

Improve get()

This commit is contained in:
Samuel Štancl 2019-08-16 17:55:40 +02:00
parent 2fe464a1f9
commit 1216addd1f

View file

@ -273,6 +273,10 @@ final class TenantManager
{
$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)) {
return $this->jsonDecodeArrayValues($this->storage->getMany($uuid, $key));
}
@ -372,6 +376,6 @@ final class TenantManager
return $this->tenant;
}
return $this->tenant[(string) $attribute];
return $this->get((string) $attribute);
}
}