public function EliminarCorredor(Corredor $Corredor) { $correr; foreach ($this->corredores as $cor) { if (!($cor->getDNI() == $Corredor->getDNI())) { $correr[] = $cor; } } $this->corredores = $correr; }
public function registraCorredor(Corredor $corredor) { $this->corredores[$corredor->getDni()] = $corredor; }
public function ActualizarTiempoCorredorEnCarrera($tiempo, Corredor $Corredor, Carrera $Carrera) { $parti = null; foreach ($this->participantes as $par) { if ($par->getCorredor()->getDNI() == $Corredor->getDNI() && $par->getCarrera()->getId() == $Carrera->getId()) { $parti[] = new Participante($par->getDorsal(), $tiempo, $par->getCorredor(), $par->getCarrera()); } else { $parti[] = $par; } } }
public function actualizarTiempo(Carrera $carrera, Corredor $corredor, $tiempo) { $p = null; foreach ($carrera->getParticipantes() as $dni => $participante) { if ($dni == $corredor->getDni()) { $p = $participante; break; } } $p->setTiempo($tiempo); $carrera->addParticipante($corredor->getDni(), $p); }
public function ActualizarTiempoEnCarrera(Corredor $corredor, $tiempo) { $participante = BuscarParticipantePorCorredor($corredor->getDni()); $participante->ActualizarTiempo($tiempo); }