public function updateResponsable($responsableDTO)
 {
     try {
         $ctrl = new ResponsableController($this->persistenceManager);
         $responsable = new ResponsableDTO();
         $responsable->setId($responsableDTO->getId());
         $ctrl->getResponsable($responsable);
         $responsable->setResponsableFacultad($responsableDTO->getResponsableFacultad());
         $responsable->setResponsableAsignatura($responsableDTO->getResponsableAsignatura());
         $ctrl->updateResponsable($responsable);
         $cm = new CommunicationMensaje(true, SALAS_COMP_ALERT_A_OPERATION_SUCCESS, $this->ID + 47, $responsable);
         return $cm;
     } catch (Exception $e) {
         return new CommunicationMensaje(false, $e->getMessage(), $this->ID + 48 . "->" . $e->getCode());
     }
 }
 public static function loadFromXML($xmlDaos)
 {
     $daos = array();
     $doc = new DOMDocument('1.0', 'utf-8');
     $doc->loadXML($xmlDaos);
     $nodes = $doc->getElementsByTagName("Responsable");
     foreach ($nodes as $node) {
         $dao = new ResponsableDTO();
         $data = $node->getElementsByTagName("Responsable_Id");
         if ($data->length > 0) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setId($data);
         $data = $node->getElementsByTagName("responsableFacultad");
         if ($data->length > 0 && !ResponsableDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setResponsableFacultad($data);
         $data = $node->getElementsByTagName("responsableAsignatura");
         if ($data->length > 0 && !ResponsableDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setResponsableAsignatura($data);
         $data = $node->getElementsByTagName("responsablePersona");
         if ($data->length > 0 && !empty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setResponsablePersona($data);
         $daos[] = $dao;
     }
     return $daos;
 }
 public function toDTO()
 {
     $responsableDTO = new ResponsableDTO();
     $responsableDTO->setId($this->getId());
     $responsableDTO->setResponsableFacultad($this->unscapeString($this->getResponsableFacultad()));
     $responsableDTO->setResponsableAsignatura($this->unscapeString($this->getResponsableAsignatura()));
     $responsableDTO->setResponsablePersona($this->unscapeString($this->getResponsablePersona()));
     return $responsableDTO;
 }