Advertisement
Guest User

Untitled

a guest
Apr 25th, 2019
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. <?php
  2.  
  3. class Employee
  4. {
  5.     private $email;
  6.    
  7.     public function __construct(Email $email)
  8.    {
  9.         $this->email = $employeeContactInfo->getEmail()->getValue();
  10.     }
  11.  
  12.     public function getEmail(): string
  13.     {
  14.         return $this->email;
  15.     }
  16.  
  17.     public function setEmail(string $email): void
  18.     {
  19.         $emailVO = Email::createFromString($email);
  20.         $this->email = $emailVO->getValue();
  21.     }
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement