interface PropertyMappingConfigurationInterface (View source)

Configuration object for the property mapper. This interface specifies all methods which are used by the property mapper and by the type converters during the conversion process. Thus, this interface does only contain read-only methods, and no methods to set any of these options.

As developer, you should probably subclass the PropertyMappingConfiguration class if adjustments are needed there.

Methods

bool
shouldMap(string $propertyName)

No description

bool
shouldSkip(string $propertyName)

Check if the given $propertyName should be skipped during mapping.

bool
shouldSkipUnknownProperties()

Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.

getConfigurationFor(string $propertyName)

Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!

string
getTargetPropertyName(string $sourcePropertyName)

Maps the given $sourcePropertyName to a target property name.

mixed
getConfigurationValue(string $typeConverterClassName, string $key)

No description

getTypeConverter()

This method can be used to explicitely force a TypeConverter to be used for this Configuration.

Details

bool shouldMap(string $propertyName)

No description

Parameters

string $propertyName

Return Value

bool

true if the given propertyName should be mapped, false otherwise.

bool shouldSkip(string $propertyName)

Check if the given $propertyName should be skipped during mapping.

Parameters

string $propertyName

Return Value

bool

bool shouldSkipUnknownProperties()

Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.

Return Value

bool

PropertyMappingConfigurationInterface getConfigurationFor(string $propertyName)

Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!

Parameters

string $propertyName

Return Value

PropertyMappingConfigurationInterface

the property mapping configuration for the given $propertyName.

string getTargetPropertyName(string $sourcePropertyName)

Maps the given $sourcePropertyName to a target property name.

Can be used to rename properties from source to target.

Parameters

string $sourcePropertyName

Return Value

string

property name of target

mixed getConfigurationValue(string $typeConverterClassName, string $key)

No description

Parameters

string $typeConverterClassName
string $key

Return Value

mixed

configuration value for the specific $typeConverterClassName. Can be used by Type Converters to fetch converter-specific configuration

TypeConverterInterface|null getTypeConverter()

This method can be used to explicitely force a TypeConverter to be used for this Configuration.

Return Value

TypeConverterInterface|null

The type converter to be used for this particular PropertyMappingConfiguration, or NULL if the system-wide configured type converter should be used.