protected function createEntity()
 {
     $tipo = (new TipoVehiculo())->findById($_POST['txt_tipo']);
     $modelo = (new Modelo())->findById($_POST['txtmod']);
     $ruta = isset($_FILES['foto']) ? $this->upload->uploadImage($_FILES['foto']) : '';
     $obj = new Vehiculo();
     $obj->setId(isset($_POST['hid']) ? $_POST['hid'] : 0);
     $obj->setMat($_POST['txtmat']);
     $obj->setPrecio($_POST['txtprecio']);
     $obj->setCant($_POST['txtcant']);
     $obj->setDescrip($_POST['txtdes']);
     $obj->setFoto($row['vehFoto']);
     $obj->setStatus($ruta);
     $obj->setModelo($modelo);
     $obj->setTipo($tipo);
     return $obj;
 }
 public function createEntity($row)
 {
     $tipo = $this->mod_tv->findById($row['tvId']);
     $modelo = $this->mod_mod->findById($row['modId']);
     $obj = new Vehiculo();
     $obj->setId($row['vehId']);
     $obj->setMat($row['vehMatricula']);
     $obj->setPrecio($row['vehPrecio']);
     $obj->setCant($row['vehCantidad']);
     $obj->setDescrip($row['vehDescrip']);
     $obj->setFoto($row['vehFoto']);
     $obj->setStatus($row['vehStatus']);
     $obj->setModelo($modelo);
     $obj->setTipo($tipo);
     return $obj;
 }