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

use application\models\MainModel;
use application\models\hclinica\tables\Domicilio;
use application\models\MyModel;

class DomicilioModel extends MyModel
{
    public function __construct(){
        $this->db_server=$this->conexion;
        $this->table="domicilio";
        $this->idTabla="idDomicilio";
    }
    public function guardarRegistro(&$datos)
    {
        $this->guardarArray($datos, $this->idTabla);
    }
    public function getDomicilioById($idDomicilio)
    {
        return $this->getArrayById($this->idTabla, $idDomicilio);
    }
    /*private $db;
    private $table="domicilio";
    private $model;
    public function __construct(\CI_DB_mysqli_driver $driver)
    {
        $this->db=$driver;
        $this->model=new MainModel($driver, $this->table);
    }
    public function guardar(Domicilio $domicilio)
    {
        $this->model->guardar($domicilio, "idDomicilio");
    }
    public function getArrayById($idDomicilio)
    {
        return $this->model->consultarPorId("idDomicilio", $idDomicilio);
    }*/
}

