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

class Persona
{
    public $idPersona=0;
    public $nombre="";
    public $appat="";
    public $apmat="";
    public $rfc="";
    public $curp="";
    public $tipo="";
    public $fechaNacimiento="";
    public $email="";
    public $telefono="";
    public $genero="";
    public $idDomicilio=0;
    
    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;
    }
    public function __set($name, $value)
    {
        //$this->$name=$value;
        if (property_exists(__CLASS__,$name))
        {
            $this->$name = $value;
        }else{
            //echo "no hay valor";
        }
    }
    public static function tipo(){
        __CLASS__;
    }
}

