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

Unique ID generator 'handle' -> 'generate'

This commit is contained in:
Samuel Štancl 2019-09-16 16:59:18 +02:00
parent d480ea63da
commit 67bfb20e96
3 changed files with 3 additions and 3 deletions

View file

@ -13,5 +13,5 @@ interface UniqueIdentifierGenerator
* @param array $data * @param array $data
* @return string * @return string
*/ */
public static function handle(array $domains, array $data = []): string; public static function generate(array $domains, array $data = []): string;
} }

View file

@ -141,7 +141,7 @@ class Tenant implements ArrayAccess
public function generateId() public function generateId()
{ {
$this->id = $this->idGenerator->handle($this->domains, $this->data); $this->id = $this->idGenerator->generate($this->domains, $this->data);
} }
public function save(): self public function save(): self

View file

@ -8,7 +8,7 @@ use Stancl\Tenancy\Contracts\UniqueIdentifierGenerator;
class UUIDGenerator implements UniqueIdentifierGenerator class UUIDGenerator implements UniqueIdentifierGenerator
{ {
public static function handle(array $domains, array $data = []): string public static function generate(array $domains, array $data = []): string
{ {
return (string) \Webpatser\Uuid\Uuid::generate(1, $domains[0] ?? ''); return (string) \Webpatser\Uuid\Uuid::generate(1, $domains[0] ?? '');
} }