src/Model/External/Reach/Event/ReachEventRegistration.php line 7

Open in your IDE?
  1. <?php
  2. namespace App\Model\External\Reach\Event;
  3. use App\Model\External\Reach\ReachEvent;
  4. class ReachEventRegistration implements \Serializable
  5. {
  6.     private $attendeeID;
  7.     private $contactID;
  8.     private $eventID;
  9.     private $when;
  10.     private $status;
  11.     private $actualStart;
  12.     private $actualEnd;
  13.     private $notes;
  14.     public function __construct(string $json=null) {
  15.         if(is_string($json))
  16.             $this->unserialize($json);
  17.     }
  18.     public function serialize() {
  19.         return json_encode(get_object_vars($this));
  20.     }
  21.     function __serialize() {
  22.         return $this->serialize();
  23.     }
  24.     function __unserialize($data) {
  25.         return $this->unserialize($data);
  26.     }
  27.     public function unserialize($serialized)
  28.     {
  29.         $data json_decode($serializedtrue);
  30.         $this->attendeeID $data['attendeeID'];
  31.         $this->contactID $data['contactID'];
  32.         $this->eventID $data['eventID'];
  33.         $this->when $data['when'];
  34.         $this->status $data['status'];
  35.         $this->actualStart $data['actualStart'];
  36.         $this->actualEnd $data['actualEnd'];
  37.         $this->notes $data['notes'];
  38.     }
  39. }