<?php
namespace application\models\hclinica\tables;

class PacienteTable
{
    public $idPaciente;
    public $idPersona;
    public $codigo;
    public $comentario;
    public $status;
    
    private $data = array();
    
    public function __construct($post=null)
    {
        if($post!=null)
        {
            foreach ($post as $key=>$value)
            {
                $this->__set($key, $value);
            }
        }
    }
    public function __get($name)
    {
        if (property_exists(__CLASS__, $name)) {
            return $this->$name;
        }
        return NULL;
        //return $this->data[$name];
    }
    public function __set($name, $value)
    {
        //$this->$name=$value;
        if (property_exists(__CLASS__,$name))
        {
            $this->$name = $value;
        }else{
            //echo "no hay valor";
        }
        //$this->data[$name]=$value;
    }
    public function getData()
    {
        return $this->data;
    }

    public function setData($data)
    {
        $this->data = $data;
    }

}

