Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Employee
- {
- private $email;
- public function __construct(Email $email)
- {
- $this->email = $employeeContactInfo->getEmail()->getValue();
- }
- public function getEmail(): string
- {
- return $this->email;
- }
- public function setEmail(string $email): void
- {
- $emailVO = Email::createFromString($email);
- $this->email = $emailVO->getValue();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement