<?php

class AppointmentDetails implements \JsonSerializable{

    private $name;
    private $existing;
    private $postcode;
    private $dob;
    private $phone;
    private $email;
    private $appointmentType;
    private $comments;
    private $practitioner;

    public function setName($name)
    {
        $this->name = $name;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setExisting($existing)
    {
        $this->existing = $existing;
    }

    public function getExisting()
    {
        return $this->existing;
    }

    public function setPostcode($postcode)
    {
        $this->postcode = $postcode;
    }

    public function getPostcode()
    {
        return $this->postcode;
    }

    public function setDob($dob)
    {
        $this->dob = $dob;
    }

    public function getDob()
    {
        return $this->dob;
    }

    public function setPhone($phone)
    {
        $this->phone = $phone;
    }

    public function getPhone()
    {
        return $this->phone;
    }

    public function setEmail($email)
    {
        $this->email = $email;
    }

    public function getEmail()
    {
        return $this->email;
    }

    public function setAppointmentType($appointmentType)
    {
        $this->appointmentType = $appointmentType;
    }

    public function getAppointmentType()
    {
        return $this->appointmentType;
    }

    public function setComments($comments)
    {
        $this->comments = $comments;
    }

    public function getComments()
    {
        return $this->comments;
    }

    public function setPractitioner($practitioner)
    {
        $this->practitioner = $practitioner;
    }

    public function getPractitioner()
    {
        return $this->practitioner;
    }

    public function toString()
    {
        return implode('|', [
            $this->name,
            $this->existing,
            $this->postcode,
            $this->dob,
            $this->phone,
            $this->email,
            $this->appointmentType,
            $this->comments,
            $this->practitioner,
        ]);
    }

    public function jsonSerialize()
    {
        return get_object_vars($this);
    }

}
?>