Skip to content

Instantly share code, notes, and snippets.

@paolooo
Created March 16, 2017 15:05
Show Gist options
  • Save paolooo/c65217413924b56860dcdf799fa40cd0 to your computer and use it in GitHub Desktop.
Save paolooo/c65217413924b56860dcdf799fa40cd0 to your computer and use it in GitHub Desktop.
<?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