uuid = $uuid; } else { $this->uuid = $aUuid; } } public function isValid () { if(preg_match('/^\{?[0-9a-f]{8}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{12}\}?$/i', $this->uuid)){ return true; } return false; } public static function isuuid ($uuid) { $obj = new Uuid($uuid); return $obj->isValid(); } public function __toString () { return $this->uuid; } } ?>