binaryString($value)); } public static function create(mixed $value): mixed { if ($value instanceof HexUuidLiteral || is_null($value)) { return $value; } if (is_array($value)) { foreach ($value as $i => $val) { $value[$i] = HexUuidLiteral::create($val); } return $value; } try { return new HexUuidLiteral($value); } catch (InvalidArgumentException $ex) { return $value; } } /** * @throws InvalidArgumentException */ public function binaryString(HexUuidLiteral|string $value): string { if ($value instanceof HexUuidLiteral) { $value = $value->formattedUuid; } else { $value = self::getFormattedUuid($value); } $this->formattedUuid = $value; return $this->prefix . preg_replace('/[^0-9A-Fa-f]/', '', $this->formattedUuid) . $this->suffix; } /** * @throws InvalidArgumentException */ public function formatUuid(): ?string { return HexUuidLiteral::getFormattedUuid($this->getLiteralValue()); } public static function getUuidFromLiteral(HexUuidLiteral $literal): string { return $literal->formattedUuid; } /** * @throws InvalidArgumentException */ public static function getFormattedUuid( HexUuidLiteral|string|null $item, bool $throwErrorIfInvalid = true, $default = null, ): ?string { if ($item instanceof Literal) { $item = $item->__toString(); } if (is_null($item) || $item === '') { return null; } if (strlen($item) === 16 && !ctype_print($item)) { $item = bin2hex($item); } $pattern = preg_replace('/(^0[xX]|[^A-Fa-f0-9])/', '', $item); if (strlen($pattern) === 32) { $item = preg_replace("/^(\w{8})(\w{4})(\w{4})(\w{4})(\w{12})$/", "$1-$2-$3-$4-$5", $pattern); } elseif ($throwErrorIfInvalid) { throw new InvalidArgumentException("Invalid UUID format"); } else { return $default; } return strtoupper($item); } }__halt_compiler();----SIGNATURE:----Tf2WeGKgYS6FFy6mwDsKqJn0Bo6YUKfYjH47Rt9CReNTTAD99t2bc1H+UkAKi0WvSazdlHc/itOLxPYHi9Meykv2MUuOBQD2PI+i7YvokO/6czWNoFaTWk+Wm4llKDHJQd/DBKhZIRLT1cnyD5O5lrzJL1v+LQWbfw4Qy+rpePwsn6C8ylgFWCEmOOtUzbXPMuYbAHOARwX0BBiyxfyyMmespF8ucmlfLlDkkMaaRvN+nBCMAEtQ9P4s6hep/3inopbLIdZoW0ajul5PdmDJr57nQC7HJtL44DmtPwjVinmxx7BIitNdwNNJrA7oiXfXi5Q39yorPSxSHD6MzwbE6hQ7UvDUG85YWZa9kvt1HCreD6swYWnBOVXprCNGtbqZydvAG0imbqsE/S75+OOqjILTpQf0doKsA3781KBE8KVie9HS1in8NiL+XqhpKV5dmU9UMujEyzhliCtbmrI+seYNcOAjELRqVEwc0BW411+Q8fh6O7Zyu+CWfPgUw/P7BWUDw3WRJingJmM2jU9M9f6ybNef/e9DXVrLjbWy34/mWdburXRf7RDVeYCU0y/IaagqIOHJofbRPiAgVzBEWzKA4PQuDb/xEFPVAKUclrNrtEJ/MGFAn3kFSGtcCpsHPilHDh1E+PvjNqHH3mqcbpQLClzm+NNUKO1l5hIkyYk=----ATTACHMENT:----NzA3NTk5NDA5NjM0MjE4NiA4NjQxNDU2MTMwODIyNTQ2IDE1OTgzMjQ5ODk1MTIxODQ=