Set map defaults

@param Map $map
344157
private function setDefaults(Map $map)
    {
        foreach ($this->getParsedData() as $name => $value) {
            if (in_array($name, $this->defaults)) {
                $map->$name($value);
            }
        }
    }
212575
public function setDiscriminatorMap(array $map)
    {
        foreach ($map as $value => $className) {
            if (strpos($className, '\\') === false && strlen($this->namespace)) {
                $className = $this->namespace . '\\' . $className;
            }
            $this->discriminatorMap[$value] = $className;
            if ($this->name == $className) {
                $this->discriminatorValue = $value;
            } else {
                if ( ! class_exists($className)) {
                    throw MappingException::invalidClassInDiscriminatorMap($className, $this->name);
                }
                if (is_subclass_of($className, $this->name)) {
                    $this->subClasses[] = $className;
                }
            }
        }
    }
1038681
protected function define(MapperDefinition $map)
    {
        $map->type(Money::class);

        $map->property(Money::AMOUNT)->to($this->amountColumnName)->asInt();

        // We don't use the typical enum mapper as their are too many
        // currency codes to reasonably map to an enum column
        $map->enum(Money::CURRENCY)
            ->to($this->currencyColumnName)
            ->asVarchar(5);
    }
55522
protected function define(MapperDefinition $map)
    {
        $map->type(LatLng::class);

        // 8 decimal places should be plenty accurate as per
        // @see https://en.wikipedia.org/wiki/Decimal_degrees#Precision

        // Lat: 2 figures as within -90 to 90
        $map->property(LatLng::LAT)->to($this->latColumnName)->asDecimal(10, 8);

        // Lng: 3 figures as within -180 to 180
        $map->property(LatLng::LNG)->to($this->lngColumnName)->asDecimal(11, 8);
    }
655436
@Override
	public void setParameters(Map<String, ?> map) {
		if (isOpen) {
			throw new UnsupportedOperationException(MSG_CANNOT_CHANGE_PROP);
		}

		for (Entry<String, ?> entry : map.entrySet()) {
			if (this.driver.getOptions().hasOption(entry.getKey())) {
				String longKey = this.driver.getOptions().getOption(entry.getKey()).getLongOpt();
				this.parameters.put(longKey, entry.getValue() == null ? "" : entry.getValue().toString());
			} else {
				throw new UnsupportedOperationException(MSG_WRONG_ARGUMENT);
			}
		}
	}
83026
protected function setMapper(QueryMapperInterface $mapper = null): self
    {
        if (is_null($mapper)) {
            return $this->setDefaultMapper();
        }
        
        $this->mapper = $mapper;
        
        return $this;
    }
255271
public function setMapping($mapping)
    {
        if ($this->serialized !== null) {
            throw ODMException::valueObjectAlreadySerialized();
        }

        $this->mapping = $mapping;

        $this->serialize();
    }
234242
public function addMaps(array $maps)
    {
        foreach ($maps as $locale => $map) {
            $this->addMap($locale, $map);
        }

        return $this;
    }
328809
public void setClazzToPuMap(Map<String, List<String>> map)
    {
        if (clazzToPuMap == null)
        {
            this.clazzToPuMap = map;
        }
        else
        {
            clazzToPuMap.putAll(map);
        }
    }
1259426
protected function define(MapperDefinition $map)
    {
        $map->type($this->classType());

        $this->defineStringColumnType($map->property(StringValueObject::STRING)->to($this->columnName));
    }
903964
public function setPreferredMappings(array $mappings): void
    {
        foreach ($mappings as $language => $map) {
            $this->preferred[$language] = (array) $map;
        }
    }
45042
public void setValuesForIn(String values, String name, Map<String, Object> map) {
        getMapHelper().setValuesForIn(values, name, map);
    }
1293047
private static void setValue(Map<String,String> map, String key, String value) {
		map.put(key,value);
	}
596801
public function extend_fieldmap($map)
    {
        if (is_array($map)) {
            self::$fieldmap = array_merge($map, self::$fieldmap);
        }
    }
474624
public function setDiscriminatorMap(array $map) : void
    {
        foreach ($map as $value => $className) {
            $this->addDiscriminatorMapClass($value, $className);
        }
    }
402418
function setMapType($type) {
        switch($type) {
            case 'hybrid':
                $this->map_type = 'HYBRID';
                break;
            case 'satellite':
                $this->map_type = 'SATELLITE';
                break;
            case 'terrain':
                $this->map_type = 'TERRAIN';
                break;
            case 'map':
            default:
                $this->map_type = 'ROADMAP';
                break;
        }       
    }
815533
protected function define(MapperDefinition $map)
    {
        $map->type(ContentGroup::class);
        $map->toTable('content_groups');

        $map->idToPrimaryKey('id');

        $map->column('parent_id')->nullable()->asUnsignedInt();
        $map->property(ContentGroup::NAMESPACE)->to('namespace')->asVarchar(255);
        $map->property(ContentGroup::NAME)->to('name')->asVarchar(255);
        $map->property(ContentGroup::ORDER_INDEX)->to('order_index')->asInt();

        $map->embeddedCollection(ContentGroup::HTML_CONTENT_AREAS)
            ->toTable('content_group_html_areas')
            ->withPrimaryKey('id')
            ->withForeignKeyToParentAs('content_group_id')
            ->usingCustom(function (MapperDefinition $map) {
                $map->type(HtmlContentArea::class);

                $map->property(HtmlContentArea::NAME)->to('name')->asVarchar(100);
                $map->embedded(HtmlContentArea::HTML)
                    ->using(new HtmlMapper('html'));
                $map->column('content_group_id')->asUnsignedInt();

                $map->unique('content_group_html_unique_index')
                    ->on(['content_group_id', 'name']);
            });

        $map->embeddedCollection(ContentGroup::IMAGE_CONTENT_AREAS)
            ->toTable('content_group_image_areas')
            ->withPrimaryKey('id')
            ->withForeignKeyToParentAs('content_group_id')
            ->usingCustom(function (MapperDefinition $map) {
                $map->type(ImageContentArea::class);

                $map->column('content_group_id')->asUnsignedInt();
                $map->property(ImageContentArea::NAME)->to('name')->asVarchar(100);
                $map->embedded(ImageContentArea::IMAGE)
                    ->using(new ImageMapper('image_path', 'client_file_name', $this->contentConfig->getImageStorageBasePath()));
                $map->property(ImageContentArea::ALT_TEXT)->to('alt_text')->nullable()->asVarchar(1000);

                $map->unique('content_group_images_unique_index')
                    ->on(['content_group_id', 'name']);
            });

        $map->embeddedCollection(ContentGroup::TEXT_CONTENT_AREAS)
            ->toTable('content_group_text_areas')
            ->withPrimaryKey('id')
            ->withForeignKeyToParentAs('content_group_id')
            ->usingCustom(function (MapperDefinition $map) {
                $map->type(TextContentArea::class);

                $map->column('content_group_id')->asUnsignedInt();
                $map->property(TextContentArea::NAME)->to('name')->asVarchar(100);
                $map->property(TextContentArea::TEXT)->to('text')->asText();

                $map->unique('content_group_text_unique_index')
                    ->on(['content_group_id', 'name']);
            });

        $map->embeddedCollection(ContentGroup::FILE_CONTENT_AREAS)
            ->toTable('content_group_file_areas')
            ->withPrimaryKey('id')
            ->withForeignKeyToParentAs('content_group_id')
            ->usingCustom(function (MapperDefinition $map) {
                $map->type(FileContentArea::class);

                $map->column('content_group_id')->asUnsignedInt();
                $map->property(FileContentArea::NAME)->to('name')->asVarchar(100);
                $map->embedded(FileContentArea::FILE)
                    ->using(new FileMapper('file_path', 'client_file_name', $this->contentConfig->getFileStorageBasePath()));

                $map->unique('content_group_file_unique_index')
                    ->on(['content_group_id', 'name']);
            });


        $map->embeddedCollection(ContentGroup::METADATA)
            ->toTable('content_group_metadata')
            ->withPrimaryKey('id')
            ->withForeignKeyToParentAs('content_group_id')
            ->usingCustom(function (MapperDefinition $map) {
                $map->type(ContentMetadata::class);

                $map->column('content_group_id')->asUnsignedInt();
                $map->property(ContentMetadata::NAME)->to('name')->asVarchar(100);
                $map->property(ContentMetadata::VALUE)->to('value')->asVarchar(1000);

                $map->unique('content_group_metadata_unique_index')
                    ->on(['content_group_id', 'name']);
            });

        $map->relation(ContentGroup::NESTED_ARRAY_CONTENT_GROUPS)
            ->using($this)
            ->toMany()
            ->identifying()
            ->withOrderPersistedTo('order_index')
            ->withParentIdAs('parent_id');

        $map->embedded(ContentGroup::UPDATED_AT)
            ->using(new DateTimeMapper('updated_at'));
    }