Basic user management

This commit is contained in:
th.guenther committed 2026-02-05 00:46:22 +01:00
1 parent e280fcfba8
commit 11108bdfcc
55 files changed
+1524 -54

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
<?php
namespace App\ValueObjects;
class EmailAddress {
private string $value;
public static function fromString(string $value) : EmailAddress {
if (!filter_var($value, FILTER_VALIDATE_EMAIL)) {
throw new \InvalidArgumentException("Invalid email address: $value");
}
$emailAddress = new EmailAddress();
$emailAddress->setValue($value);
return $emailAddress;
}
public function getValue(): string
{
return $this->value;
}
public function setValue(string $value): void
{
$this->value = $value;
}
}