Exemplo n.º 1
0
 protected function __setData(stdClass $data)
 {
     $this->__setContentFields();
     $this->_entity->setDoctorResponse($data->response);
     $this->_entity->setVisitorQuestion($data->question);
     $this->_entity->setVisitorName($data->visitor_name);
     $this->_entity->setVisitorEmail($data->visitor_email);
     $doctor = Application_Model_Medical_Doctor::getById($data->id_doctor);
     if ($doctor instanceof Application_Model_Medical_Doctor) {
         $this->_entity->setDoctor($doctor);
     } else {
         $this->_entity->resetDoctor();
     }
     $this->_entity->setShownOnMain($data->shown_on_main);
 }