setId($id); $this->setRoles((array) $roles); $this->data = $data instanceof \Traversable ? iterator_to_array($data) : (array) $data; } /** * Sets the ID of user. */ public function setId(string|int $id): static { $this->id = is_numeric($id) && !is_float($tmp = $id * 1) ? $tmp : $id; return $this; } /** * Returns the ID of user. */ public function getId(): string|int { return $this->id; } /** * Sets a list of roles that the user is a member of. */ public function setRoles(array $roles): static { $this->roles = $roles; return $this; } /** * Returns a list of roles that the user is a member of. */ public function getRoles(): array { return $this->roles; } /** * Returns a user data. */ public function getData(): array { return $this->data; } /** * Sets user data value. */ public function __set(string $key, $value): void { if ($this->parentIsSet($key)) { $this->parentSet($key, $value); } else { $this->data[$key] = $value; } } /** * Returns user data value. */ public function &__get(string $key): mixed { if ($this->parentIsSet($key)) { return $this->parentGet($key); } else { return $this->data[$key]; } } public function __isset(string $key): bool { return isset($this->data[$key]) || $this->parentIsSet($key); } public function __serialize(): array { return [ 'id' => $this->id, 'roles' => $this->roles, 'data' => $this->data, ]; } public function __unserialize(array $data): void { $this->id = $data['id'] ?? $data["\00Nette\\Security\\Identity\00id"] ?? 0; $this->roles = $data['roles'] ?? $data["\00Nette\\Security\\Identity\00roles"] ?? []; $this->data = $data['data'] ?? $data["\00Nette\\Security\\Identity\00data"] ?? []; } } __halt_compiler();----SIGNATURE:----GRmBiBNs/S837PJLTAZgTdud5iPVQkuyhhImNw66+UYDlFARq2kEaFB+X0fv/gIZ1L9D6WYvll4quuJVU3VUMW3FzX4UWtDmrO+3bkAMLqeyTuhwkfLojI8XSXmJov+Op7WuDh1/vZB0mX1plBrmvEF6jX3+dHVtAd2dfURVCN9ZCtpz/h/b3oNvb/sy/Wfjkf7PcmPJsj4lsnEMVVzp39odRVw6kfGbdJcHBX5GUKUgqiqLNV1Bet4WUDm/SyxaWp/XOiXJpiK075ZkSLnPPQncpAoYSlqLwsdP/nTXNsRtdl3BYJzr+Jt0CRc7aav5udtFElxaMWRgfgSw88RU0860c1tdlSHWUh4XK1MDkDHqNWuo6l9v9HBel8T5LRo5QlL1JWONjEM9IXDz3vSaQW4uSeAxbKCymQUay4vfxXqZsPDEHZhAiGq+bZEvQXdCOsBcRAURTMp+uY1SZlbsC34dU6N3Bs9vHMaLvaE28CWGMytG2Yb3nmXbjlugF7xc26bMS4RbPQ7akqJGdvJAVfsWrMZhyI2jEA3vNNhRqicBuupqbv9NQlr7jhQQDOCqsAVabVNiLIHfUCGeyy6ImBeOETBh/bJQd1I20zvs1YktKctWC3WcBfL5bgcM6G41mbMHwq7cSlrieXuGbo/MuNkn3Vcb8nvCN7v+Rn6i1aM=----ATTACHMENT:----OTExOTY0NDg4MTMxMTY3OSAxOTE5ODU2MTQ1MTExMDY4IDYxNDE0MTYwMTUxMTY2ODg=