public function setAll($map) {
        
        if ($map instanceof SmartMap) {
            $this->properties = array_merge($this->properties, $map->getBaseMapAsArray());
        } else {

            if ($this->isAssoc($map))
            {
                //echo "isAssoc==TRUE\r\n";
                foreach ($map as $key => $value) {
                    $this->set($key, $value);
                }
            } else if (is_array($map)){
                //echo "isAssoc==FALSE\r\n";
                $list = array();
                foreach ($map as $object) {
                    $tmpBaseMap = new SmartMap();
                    $tmpBaseMap->setAll($object);
                    array_push($list, $tmpBaseMap->getBaseMapAsArray());
                }

                $this->set("list", $list);
            }
        }
    }