<?php
require_once __DIR__. '/../optician-panel/helpers/Util.php';

class PractitionerInfo implements \JsonSerializable{
    private $name;
    private $notes;
    private $base64_decoded_notes;
    public function __construct($name)
    {
        $data = explode(":", $name);
        $this->name = $data[0];
        if(isset($data[1])){
            $this->notes = implode(":", array_slice($data, 1));
        }
    }

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

    public function getNotes(){
        return $this->notes;
    }

    public function getBase64DecodedNotes(){
        return $this->base64_decoded_notes;
    }

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

?>