Ejemplo n.º 1
0
 public function setAttributes($attr)
 {
     parent::setAttributes($attr);
     $props = $attr['property'];
     if (isset($props) && is_array($props)) {
         foreach ($props as $propertyAttr) {
             $property = new Property();
             $property->setAttributes($propertyAttr);
             $this->property[] = $property;
         }
     }
 }
Ejemplo n.º 2
0
 public function setAttributes($attr)
 {
     parent::setAttributes($attr);
     if (isset($attr['property']) && is_array($attr['property'])) {
         $props = $attr['property'];
         foreach ($props as $propertyAttr) {
             $property = new Property();
             $property->setAttributes($propertyAttr);
             $this->property[] = $property;
         }
     }
     if (isset($attr['objects']) && is_array($attr['objects'])) {
         $objects = $attr['objects'];
         foreach ($objects as $objectAttr) {
             $obj = new Object();
             $obj->setAttributes($objectAttr);
             $this->objects[] = $obj;
         }
     }
 }