PropertyMappingConfigurationInterface
Configuration object for the property mapper.
Table of Contents
Methods
- allowAllProperties() : PropertyMappingConfigurationInterface
- allowProperties() : PropertyMappingConfigurationInterface
- forProperty() : PropertyMappingConfigurationInterface
- getConfigurationFor() : PropertyMappingConfigurationInterface
- Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
- getConfigurationValue() : mixed
- getTargetPropertyName() : non-empty-string
- Maps the given $sourcePropertyName to a target property name.
- getTypeConverter() : TypeConverterInterface|null
- This method can be used to explicitly force a TypeConverter to be used for this Configuration.
- setTypeConverterOption() : PropertyMappingConfigurationInterface
- setTypeConverterOptions() : PropertyMappingConfigurationInterface
- shouldMap() : bool
- shouldSkip() : bool
- returns TRUE if the given propertyName should be mapped, FALSE otherwise.
- shouldSkipUnknownProperties() : bool
- Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.
- traverseProperties() : PropertyMappingConfigurationInterface
Methods
allowAllProperties()
public
allowAllProperties() : PropertyMappingConfigurationInterface
Return values
PropertyMappingConfigurationInterfaceallowProperties()
public
allowProperties(non-empty-string ...$propertyNames) : PropertyMappingConfigurationInterface
Parameters
- $propertyNames : non-empty-string
Return values
PropertyMappingConfigurationInterfaceforProperty()
public
forProperty(non-empty-string $propertyPath) : PropertyMappingConfigurationInterface
Parameters
- $propertyPath : non-empty-string
Return values
PropertyMappingConfigurationInterfacegetConfigurationFor()
Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
public
getConfigurationFor(non-empty-string $propertyName) : PropertyMappingConfigurationInterface
Parameters
- $propertyName : non-empty-string
Return values
PropertyMappingConfigurationInterface —the property mapping configuration for the given $propertyName.
getConfigurationValue()
public
getConfigurationValue(TypeConverterInterface> $typeConverterClassName, non-empty-string|int $key) : mixed
Parameters
- $typeConverterClassName : TypeConverterInterface>
- $key : non-empty-string|int
Return values
mixed —configuration value for the specific $typeConverterClassName. Can be used by Type Converters to fetch converter-specific configuration
getTargetPropertyName()
Maps the given $sourcePropertyName to a target property name.
public
getTargetPropertyName(non-empty-string $sourcePropertyName) : non-empty-string
Can be used to rename properties from source to target.
Parameters
- $sourcePropertyName : non-empty-string
Return values
non-empty-string —property name of target
getTypeConverter()
This method can be used to explicitly force a TypeConverter to be used for this Configuration.
public
getTypeConverter() : TypeConverterInterface|null
Return values
TypeConverterInterface|null —The type converter to be used for this particular PropertyMappingConfiguration, or NULL if the system-wide configured type converter should be used.
setTypeConverterOption()
public
setTypeConverterOption(TypeConverterInterface> $typeConverter, string|int $optionKey, mixed $optionValue) : PropertyMappingConfigurationInterface
Parameters
- $typeConverter : TypeConverterInterface>
- $optionKey : string|int
- $optionValue : mixed
Return values
PropertyMappingConfigurationInterfacesetTypeConverterOptions()
public
setTypeConverterOptions(TypeConverterInterface> $typeConverter, array<string|int, mixed> $options) : PropertyMappingConfigurationInterface
Parameters
- $typeConverter : TypeConverterInterface>
- $options : array<string|int, mixed>
Return values
PropertyMappingConfigurationInterfaceshouldMap()
public
shouldMap(non-empty-string $propertyName) : bool
Parameters
- $propertyName : non-empty-string
Return values
boolshouldSkip()
returns TRUE if the given propertyName should be mapped, FALSE otherwise.
public
shouldSkip(non-empty-string $propertyName) : bool
Parameters
- $propertyName : non-empty-string
Return values
boolshouldSkipUnknownProperties()
Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.
public
shouldSkipUnknownProperties() : bool
Return values
booltraverseProperties()
public
traverseProperties(array<string|int, mixed> $splitPropertyPath) : PropertyMappingConfigurationInterface
Parameters
- $splitPropertyPath : array<string|int, mixed>