public function populateFromRow($data)
 {
     $this->id = isset($data['id']) ? intval($data['id']) : null;
     $this->sfid = isset($data['nombre']) ? $data['nombre'] : null;
     $this->nombre_comercial = isset($data['nombre_comercial']) ? $data['nombre_comercial'] : null;
     $this->tipo = isset($data['tipo']) ? intval($data['tipo']) : null;
     if ($this->tipo && !isset($data['no_deep'])) {
         $this->obj_tipo = Tipo::find($this->tipo);
     }
     $this->direccion = isset($data['direccion']) ? $data['direccion'] : null;
     $this->cp = isset($data['cp']) ? $data['cp'] : null;
     $this->poblacion = isset($data['poblacion']) ? intval($data['poblacion']) : null;
     if ($this->poblacion && !isset($data['no_deep'])) {
         $this->obj_poblacion = Poblacion::find($this->poblacion);
     }
     $this->lat = isset($data['lat']) ? $data['lat'] : null;
     $this->lng = isset($data['lng']) ? $data['lng'] : null;
     $this->texto_promocion = isset($data['texto_promocion']) ? $data['texto_promocion'] : null;
     $this->texto_animacion = isset($data['texto_animacion']) ? $data['texto_animacion'] : null;
 }
Example #2
0
<?php

if (!isset($_GET['id'])) {
    include "html/idxCRUD.php";
    include "lst/lstTipo.php";
} else {
    $tipo = Tipo::find($_GET['id']);
    if ($tipo) {
        include "reg/regTipo.php";
    } else {
        echo "Tipo inexistente!";
    }
}
include "frm/frmTipo.php";