23 lines
358 B
PHP
23 lines
358 B
PHP
<?php
|
|
|
|
namespace App\ValueObjects;
|
|
|
|
class EmailAddress
|
|
{
|
|
private string $normalized;
|
|
|
|
public function __construct(string $email)
|
|
{
|
|
$this->normalized = $email;
|
|
}
|
|
|
|
public function value(): string
|
|
{
|
|
return $this->normalized;
|
|
}
|
|
|
|
public function __toString(): string
|
|
{
|
|
return $this->normalized;
|
|
}
|
|
}
|