Exemple #1
0
 public function loadFromSqlResultQuery($rq)
 {
     $this->id = $rq[$this->PRIMARY_KEY_DB_NAME];
     if (isset($rq[$this->SALON_NOMBRE]) && !SalonDTO::isEmpty($rq[$this->SALON_NOMBRE])) {
         $this->salonNombre = $this->scapeString($rq[$this->SALON_NOMBRE]);
     } else {
         $this->salonNombre = null;
     }
 }
 public static function loadFromXML($xmlDaos)
 {
     $daos = array();
     $doc = new DOMDocument('1.0', 'utf-8');
     $doc->loadXML($xmlDaos);
     $nodes = $doc->getElementsByTagName("Salon");
     foreach ($nodes as $node) {
         $dao = new SalonDTO();
         $data = $node->getElementsByTagName("Salon_Id");
         if ($data->length > 0) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setId($data);
         $data = $node->getElementsByTagName("salonNombre");
         if ($data->length > 0 && !SalonDTO::isEmpty($data->item(0)->nodeValue)) {
             $data = $data->item(0)->nodeValue;
         } else {
             $data = null;
         }
         $dao->setSalonNombre($data);
         $daos[] = $dao;
     }
     return $daos;
 }