<?php
namespace App\Model\External\Reach\Event;
use App\Model\External\Reach\ReachEvent;
class ReachEventRegistration implements \Serializable
{
private $attendeeID;
private $contactID;
private $eventID;
private $when;
private $status;
private $actualStart;
private $actualEnd;
private $notes;
public function __construct(string $json=null) {
if(is_string($json))
$this->unserialize($json);
}
public function serialize() {
return json_encode(get_object_vars($this));
}
function __serialize() {
return $this->serialize();
}
function __unserialize($data) {
return $this->unserialize($data);
}
public function unserialize($serialized)
{
$data = json_decode($serialized, true);
$this->attendeeID = $data['attendeeID'];
$this->contactID = $data['contactID'];
$this->eventID = $data['eventID'];
$this->when = $data['when'];
$this->status = $data['status'];
$this->actualStart = $data['actualStart'];
$this->actualEnd = $data['actualEnd'];
$this->notes = $data['notes'];
}
}