public function updatePrestamoEstudiante(Prestamo $entity, Estudiante $prestamoEstudiante) { $entity->setPrestamoEstudiante($prestamoEstudiante->getId()); return $this->persistenceManager->update($entity); }
<?php require "persona.php"; $persona = new Persona("45368554G", "Paco", 32121, "ayer", 3); $persona1 = new Persona("45368556K", "Fabricio", 35116, "14/12/1993", 0); $estudiante = new Estudiante("45368554G", "Paco", 32121, "ayer", 0, 3, 1); $estudiante1 = new Estudiante("45368556K", "Fabricio", 35116, "14/12/1993", 4, 2, 2); $estudiante2 = new Estudiante("45365987G", "Juan", 35124, "hoy", 5, 1, 3); // array normal $arrayEstudiantes = array($estudiante, $estudiante1, $estudiante2); // array con clave - valor $arrayEstudiantes1 = array($estudiante->getId() => $estudiante, $estudiante1->getId() => $estudiante1, $estudiante2->getId() => $estudiante2); // recorrer array normal goto a; foreach ($arrayEstudiantes as $valor) { echo $valor->getNombre(); } a: // recorrer array con clave - valor $a = $estudiante->getId(); foreach ($arrayEstudiantes1 as $a => $valor) { echo $valor->getNombre(); } function conectar() { include "connection.php"; } // echo "<br>DNI: " . $persona->getNif() . "<br>"; // echo "Nombre: " . $persona->getNombre() . "<br>"; // echo "Codigo postal: " . $persona->getCPostal() . "<br>"; // echo "Fecha nacimiento: " . $persona->getFnac() . "<br>";
public function updateMonitorEstudiante(Monitor $entity, Estudiante $monitorEstudiante) { $entity->setMonitorEstudiante($monitorEstudiante->getId()); return $this->persistenceManager->update($entity); }
public function updateObjetoPerdidoEstudiante(ObjetoPerdido $entity, Estudiante $objetoPerdidoEstudiante) { $entity->setObjetoPerdidoEstudiante($objetoPerdidoEstudiante->getId()); return $this->persistenceManager->update($entity); }
public function eliminar(Estudiante $obj) { $sql = "delete from estudiante where id =" . $obj->getId(); $resultado = $this->object->ejecutar($sql); $this->object->respuesta($resultado, 'estudiantes'); }
public function updateImpresionEstudiante(Impresion $entity, Estudiante $impresionEstudiante) { $entity->setImpresionEstudiante($impresionEstudiante->getId()); return $this->persistenceManager->update($entity); }