public function EliminarCarrera(Carrera $Carrera) { $carrer = null; foreach ($this->carreras as $car) { if (!($car->getId() == $Carrera->getId())) { $carrer[] = $car; } } $this->carreras = $carrer; }
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; } } }