Created
March 16, 2017 15:05
-
-
Save paolooo/c65217413924b56860dcdf799fa40cd0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
final class SampleEvent | |
{ | |
private $id; | |
private $Email; | |
public function __construct(UserId $id, Email $email) | |
{ | |
$this->name = $name; | |
$this->email = $email; | |
} | |
public function id() | |
{ | |
return $this->id; | |
} | |
public function email() | |
{ | |
return $this->email; | |
} | |
} | |
$sample_event = new SampleEvent(new UserId(1), new Email('[email protected]')); | |
$event = serialize($sample_event); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment