diff --git a/src/DataStructures/UUID.php b/src/DataStructures/UUID.php new file mode 100644 index 0000000..13453c3 --- /dev/null +++ b/src/DataStructures/UUID.php @@ -0,0 +1,24 @@ +UUID = $uuid; + } else { + throw new InvalidUUIDFormatException(); + } + } + public function __toString(): string + { + return "{{$this->UUID}}"; + } +} diff --git a/src/Exceptions/InvalidUUIDFormatException.php b/src/Exceptions/InvalidUUIDFormatException.php new file mode 100644 index 0000000..3f0dbe0 --- /dev/null +++ b/src/Exceptions/InvalidUUIDFormatException.php @@ -0,0 +1,17 @@ +message = "$message"; + $this->code = $code; + } +}