function rowToDto($row) { $objNota = new Nota(); $objNota->setId($row["Id"]); $objNota->setFecha($row["Fecha"]); $objNota->setNota($row["Nota"]); $objNota->setEstado($row["Estado"]); $objNota->setId_categoria($row["Id_categoria"]); return $objNota; }
private function mapearNota(Nota $nota, array $props) { if (array_key_exists('idNota', $props)) { $nota->setId($props['idNota']); } if (array_key_exists('primerP', $props)) { $nota->setPrimerP($props['primerP']); } if (array_key_exists('segundoP', $props)) { $nota->setSegundoP($props['segundoP']); } if (array_key_exists('tercerP', $props)) { $nota->setTercerP($props['tercerP']); } if (array_key_exists('cuartoP', $props)) { $nota->setCuartoP($props['cuartoP']); } if (array_key_exists('definitiva', $props)) { $nota->setDefinitiva($props['definitiva']); } }
function rowToDto($row) { $objNota = new Nota(); $objNota->setId($row["id"]); $objNota->setFecha($row["fecha"]); $objNota->setTitulo($row["titulo"]); $objNota->setNota($row["nota"]); $objNota->setEstado($row["estado"]); $objNota->setIdCategoria($row["idCategoria"]); return $objNota; }