public function fullLoad() { if ($this->getUserId()) { $user = new User(); $user->load($this->getUserId()); $this->setUserName($user->getName() . ' ' . $user->getSecondName()); } if ($this->getPatientId()) { $patient = new Patient(); $patient->load($this->getPatientId()); $this->setPatientName($patient->getName() . ' ' . $patient->getSecondName()); } if ($this->getDiseaseId()) { $disease = new Disease(); $disease->load($this->getDiseaseId()); $this->setTitle($disease->getTitle()); } }
public function fullLoad() { if ($this->getUserId()) { $user = new User(); $user->load($this->getUserId()); $this->setUserName($user->getName() . ' ' . $user->getSecondName()); } if ($this->getPatientId()) { $patient = new Patient(); $patient->load($this->getPatientId()); $this->setPatientName($patient->getName() . ' ' . $patient->getSecondName()); } if ($this->getServiceId()) { $service = new Service(); $service->load($this->getServiceId()); $this->setTitle($service->getTitle()); $this->setPrice($service->getPrice()); } }