{@inheritDoc}
@see \n2n\web\dispatch\mag\Mag::setupMappingDefinition()
346447
public function setupMappingDefinition(\n2n\web\dispatch\map\bind\MappingDefinition $md) {
		$this->decorated->setupMappingDefinition($md);
	}
694843
private function initializeMapper() {
    // set the mapper
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    if ($persistenceFacade->isKnownType($this->type)) {
      $this->mapper = $persistenceFacade->getMapper($this->type);
    }
    else {
      // initialize null mapper if not done already
      if (self::$nullMapper == null) {
        self::$nullMapper = new NullMapper();
      }
      $this->mapper = self::$nullMapper;
    }
  }
119369
public function mapParameters(ParameterDefinitionCollectionInterface $definitions, array $values): Generator
    {
        foreach ($definitions->getParameterDefinitions() as $parameterDefinition) {
            $parameterName = $parameterDefinition->getName();
            $parameterType = $parameterDefinition->getType();

            $value = array_key_exists($parameterName, $values) ?
                $parameterType->fromHash($parameterDefinition, $values[$parameterName]) :
                $parameterDefinition->getDefaultValue();

            yield $parameterName => Parameter::fromArray(
                [
                    'name' => $parameterName,
                    'parameterDefinition' => $parameterDefinition,
                    'value' => $value,
                    'isEmpty' => $parameterType->isValueEmpty($parameterDefinition, $value),
                ]
            );

            if ($parameterDefinition instanceof CompoundParameterDefinition) {
                yield from $this->mapParameters($parameterDefinition, $values);
            }
        }
    }
1097426
public function setMappings($mappings)
    {
        if ($mappings instanceof \Closure) {
            $mappings = $mappings();
        }

        $this->mappings = (array) $mappings;

        return $this;
    }
1329091
public function add($mappingClass)
    {
        try {
            if ($mappingClass instanceof MappingInterface) {
                $mappingClassInstance = $mappingClass;
            } else {
                $reflectionClass = new \ReflectionClass($mappingClass);
                $mappingClassInstance = $reflectionClass->newInstance();
                if (!$mappingClassInstance instanceof MappingInterface) {
                    throw new InvalidMappingClassException('Mapping class must be an instance of MappingInterface');
                }
            }
            self::$container[$mappingClassInstance->getName()] = $mappingClassInstance;
        } catch (\Exception $ex) {
            throw new InvalidMappingClassException($ex->getMessage());
        }
        return $this;
    }
331594
protected function define(MapperDefinition $map)
    {
        $map->type(AnalyticsDriverConfig::class);
        $map->toTable('analytics');

        $map->idToPrimaryKey('id');

        $map->property(AnalyticsDriverConfig::DRIVER_NAME)->to('driver')->asVarchar(255);
        $map->property(AnalyticsDriverConfig::OPTIONS)
            ->mappedVia(function (FormObject $options) : string {
                $values            = $this->transformFilesToArrays($options->unprocess($options->getInitialValues()));
                $values['__class'] = get_class($options);

                return json_encode($values);
            }, function (string $json) : FormObject {
                $values = $this->restoreFilesFromStrings(json_decode($json, true));

                return $values['__class']::build(array_diff_key($values, ['__class' => true]));
            })
            ->to('options')
            ->asText();
    }
1057733
protected function addMappingNode(
        string $nodeName,
        string $entityClass,
        string $entityMappingFile,
        string $entityManager,
        bool $entityEnabled
    ): NodeDefinition {
        $builder = new TreeBuilder();
        $node = $builder->root($nodeName);
        $node
            ->treatFalseLike([
                'enabled' => false,
            ])
            ->addDefaultsIfNotSet()
            ->children()
                ->scalarNode('class')
                    ->defaultValue($entityClass)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('mapping_file')
                    ->defaultValue($entityMappingFile)
                    ->cannotBeEmpty()
                ->end()
                ->scalarNode('manager')
                    ->defaultValue($entityManager)
                    ->cannotBeEmpty()
                ->end()
                ->booleanNode('enabled')
                    ->defaultValue($entityEnabled)
                ->end()
            ->end()
        ->end();

        return $node;
    }
546819
protected function updateMappingConfigurationForAllowedPoperties($mappingConfiguration, $settings)
    {
        $mappingConfiguration->skipUnknownProperties();

        if (isset($settings)) {
            foreach ($settings as $key => $value) {
                if ($value) {
                    $mappingConfiguration->allowProperties($key);
                }
            }
        }
    }
95869
protected function define(MapperDefinition $map)
    {
        $map->type(Date::class);

        $map->property(Date::DATE_TIME)->to($this->columnName)->asDate();
    }
51183
protected function define(MapperDefinition $map)
    {
        $map->type(BlogAuthor::class);

        $map->toTable('authors');

        $map->idToPrimaryKey('id');

        $map->property(BlogAuthor::NAME)->to('name')->asVarchar(255);

        $map->property(BlogAuthor::ROLE)->to('role')->asVarchar(255);

        $map->property(BlogAuthor::SLUG)->to('slug')->unique()->asVarchar(255);

        $map->embedded(BlogAuthor::BIO)
            ->using(new HtmlMapper('bio'));

        $map->relation(BlogAuthor::ARTICLES)
            ->to(BlogArticle::class)
            ->toMany()
            ->identifying()
            ->withBidirectionalRelation(BlogArticle::AUTHOR)
            ->withParentIdAs($map->getOrm()->getNamespace() . 'author_id');

        MetadataMapper::mapMetadataToJsonColumn($map, 'metadata');
    }
210253
public function setupBindingDefinition(BindingDefinition $bd) {
		if ($this->mandatory) {
			$bd->val($this->propertyName, new ValNotEmpty());
		}
	}
537030
function LayerDefinition(layerDefinition, options) {
  MapBase.call(this, options);
  this.endPoint = MapBase.BASE_URL;
  this.setLayerDefinition(layerDefinition, { silent: true });
}
1155647
public function from(IObjectMapper $mapper)
    {
        $this->mapper     = $mapper;
        $this->definition = $mapper->getDefinition();
        $this->relations  = $this->definition->getPropertyRelationMap();

        if ($mapper instanceof IEntityMapper) {
            foreach ($mapper->getPrimaryTable()->getColumns() as $column) {
                $this->readDefinition->addColumn($column);
            }
        }

        $this->validProperties = $this->definition->getPropertyColumnMap() + $this->relations;
    }
1171009
protected function define(MapperDefinition $map)
    {
        $map->type($this->enumClassName);

        $valueProperty = $map->property('value');

        if ($this->valueMap) {
            $valueProperty = $valueProperty
                ->mappedVia(
                    function ($phpValue) {
                        return $this->valueMap[$phpValue];
                    },
                    function ($dbValue) {
                        return $this->flippedValueMap[$dbValue];
                    }
                );
        }

        if ($this->nullable) {
            $valueProperty = $valueProperty->ignoreNullabilityTypeMismatch();
        }

        $valueProperty = $valueProperty->to($this->columnName);

        if ($this->nullable) {
            $valueProperty = $valueProperty->nullable();
        }

        if ($this->columnType) {
            $valueProperty->asType($this->columnType);
        } else {
            $valueProperty->asEnum($this->options);
        }
    }
74169
protected function define(MapperDefinition $map)
    {
        $map->type(DateRange::class);

        $map->embedded(DateRange::START)->using(new DateMapper($this->startColumnName));
        $map->embedded(DateRange::END)->using(new DateMapper($this->endColumnName));
    }
1259426
protected function define(MapperDefinition $map)
    {
        $map->type($this->classType());

        $this->defineStringColumnType($map->property(StringValueObject::STRING)->to($this->columnName));
    }
883330
public function addMapping(string $className, string $identifier): Mapper
    {
        if (class_exists($className) === false) {
            throw new ClassNotExists($className);
        }

        $this->mapping[$identifier] = $className;

        return $this;
    }