PHP Класс Neos\Flow\Property\PropertyMappingConfiguration

Наследование: implements Neos\Flow\Property\PropertyMappingConfigurationInterface
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$configuration array multi-dimensional array which stores type-converter specific configuration: 1. Dimension: Fully qualified class name of the type converter 2. Dimension: Configuration Key Value: Configuration Value
$mapUnknownProperties boolean If TRUE, unknown properties will be mapped.
$mapping array Keys which should be renamed
$propertiesNotToBeMapped array List of disallowed property names which will be ignored while property mapping
$propertiesToBeMapped array List of allowed property names to be converted
$propertiesToSkip array List of property names to be skipped during property mapping
$skipUnknownProperties boolean If TRUE, unknown properties will be skipped during property mapping
$subConfigurationForProperty array Stores the configuration for specific child properties.
$typeConverter Neos\Flow\Property\TypeConverterInterface

Открытые методы

Метод Описание
allowAllProperties ( ) : PropertyMappingConfiguration Allow all properties in property mapping, even unknown ones.
allowAllPropertiesExcept ( ) : PropertyMappingConfiguration Allow all properties during property mapping, but reject a few selected ones (blacklist).
allowProperties ( ) : PropertyMappingConfiguration Allow a list of specific properties. All arguments of allowProperties are used here (varargs).
forProperty ( string $propertyPath ) : PropertyMappingConfiguration Returns the configuration for the specific property path, ready to be modified. Should be used inside a fluent interface like: $configuration->forProperty('foo.bar')->setTypeConverterOption(.
getConfigurationFor ( string $propertyName ) : Neos\Flow\Property\PropertyMappingConfigurationInterface Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
getConfigurationValue ( string $typeConverterClassName, string $key ) : mixed
getTargetPropertyName ( string $sourcePropertyName ) : string Maps the given $sourcePropertyName to a target property name.
getTypeConverter ( ) : Neos\Flow\Property\TypeConverterInterface Return the type converter set for this configuration.
setMapping ( string $sourcePropertyName, string $targetPropertyName ) : PropertyMappingConfiguration Define renaming from Source to Target property.
setTypeConverter ( Neos\Flow\Property\TypeConverterInterface $typeConverter ) : PropertyMappingConfiguration Set a type converter which should be used for this specific conversion.
setTypeConverterOption ( string $typeConverter, string $optionKey, mixed $optionValue ) : PropertyMappingConfiguration Set a single option (denoted by $optionKey) for the given $typeConverter.
setTypeConverterOptions ( string $typeConverter, array $options ) : PropertyMappingConfiguration Set all options for the given $typeConverter.
shouldMap ( string $propertyName ) : boolean The behavior is as follows:
shouldSkip ( string $propertyName ) : boolean Check if the given $propertyName should be skipped during mapping.
shouldSkipUnknownProperties ( ) : boolean Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.
skipProperties ( ) : PropertyMappingConfiguration Skip a list of specific properties. All arguments of skipProperties are used here (varargs).
skipUnknownProperties ( ) : PropertyMappingConfiguration When this is enabled, properties that are disallowed will be skipped instead of triggering an error during mapping.
traverseProperties ( array $splittedPropertyPath ) : PropertyMappingConfiguration Traverse the property configuration. Only used by forProperty().

Защищенные методы

Метод Описание
getTypeConvertersWithParentClasses ( string $typeConverter ) : array Get type converter classes including parents for the given type converter

Описание методов

allowAllProperties() публичный Метод

Allow all properties in property mapping, even unknown ones.
public allowAllProperties ( ) : PropertyMappingConfiguration
Результат PropertyMappingConfiguration this

allowAllPropertiesExcept() публичный Метод

Example: allowAllPropertiesExcept('password', 'userGroup')
public allowAllPropertiesExcept ( ) : PropertyMappingConfiguration
Результат PropertyMappingConfiguration this

allowProperties() публичный Метод

Example: allowProperties('title', 'content', 'author')
public allowProperties ( ) : PropertyMappingConfiguration
Результат PropertyMappingConfiguration this

forProperty() публичный Метод

...)
public forProperty ( string $propertyPath ) : PropertyMappingConfiguration
$propertyPath string
Результат PropertyMappingConfiguration (or a subclass thereof)

getConfigurationFor() публичный Метод

Returns the sub-configuration for the passed $propertyName. Must ALWAYS return a valid configuration object!
public getConfigurationFor ( string $propertyName ) : Neos\Flow\Property\PropertyMappingConfigurationInterface
$propertyName string
Результат Neos\Flow\Property\PropertyMappingConfigurationInterface the property mapping configuration for the given $propertyName.

getConfigurationValue() публичный Метод

public getConfigurationValue ( string $typeConverterClassName, string $key ) : mixed
$typeConverterClassName string
$key string
Результат 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 ( string $sourcePropertyName ) : string
$sourcePropertyName string
Результат string property name of target

getTypeConverter() публичный Метод

Return the type converter set for this configuration.
public getTypeConverter ( ) : Neos\Flow\Property\TypeConverterInterface
Результат Neos\Flow\Property\TypeConverterInterface

getTypeConvertersWithParentClasses() защищенный Метод

When setting an option on a subclassed type converter, this option must also be set on all its parent type converters.
protected getTypeConvertersWithParentClasses ( string $typeConverter ) : array
$typeConverter string The type converter class
Результат array Class names of type converters

setMapping() публичный Метод

Define renaming from Source to Target property.
public setMapping ( string $sourcePropertyName, string $targetPropertyName ) : PropertyMappingConfiguration
$sourcePropertyName string
$targetPropertyName string
Результат PropertyMappingConfiguration this

setTypeConverter() публичный Метод

Set a type converter which should be used for this specific conversion.
public setTypeConverter ( Neos\Flow\Property\TypeConverterInterface $typeConverter ) : PropertyMappingConfiguration
$typeConverter Neos\Flow\Property\TypeConverterInterface
Результат PropertyMappingConfiguration this

setTypeConverterOption() публичный Метод

Set a single option (denoted by $optionKey) for the given $typeConverter.
public setTypeConverterOption ( string $typeConverter, string $optionKey, mixed $optionValue ) : PropertyMappingConfiguration
$typeConverter string class name of type converter
$optionKey string
$optionValue mixed
Результат PropertyMappingConfiguration this

setTypeConverterOptions() публичный Метод

Set all options for the given $typeConverter.
public setTypeConverterOptions ( string $typeConverter, array $options ) : PropertyMappingConfiguration
$typeConverter string class name of type converter
$options array
Результат PropertyMappingConfiguration this

shouldMap() публичный Метод

- if a property has been explicitly forbidden using allowAllPropertiesExcept(...), it is directly rejected - if a property has been allowed using allowProperties(...), it is directly allowed. - if allowAllProperties* has been called, we allow unknown properties - else, return false.
public shouldMap ( string $propertyName ) : boolean
$propertyName string
Результат boolean TRUE if the given propertyName should be mapped, FALSE otherwise.

shouldSkip() публичный Метод

Check if the given $propertyName should be skipped during mapping.
public shouldSkip ( string $propertyName ) : boolean
$propertyName string
Результат boolean

shouldSkipUnknownProperties() публичный Метод

Whether unknown (unconfigured) properties should be skipped during mapping, instead if causing an error.
public shouldSkipUnknownProperties ( ) : boolean
Результат boolean

skipProperties() публичный Метод

Example: skipProperties('unused', 'dummy')
public skipProperties ( ) : PropertyMappingConfiguration
Результат PropertyMappingConfiguration this

skipUnknownProperties() публичный Метод

When this is enabled, properties that are disallowed will be skipped instead of triggering an error during mapping.
public skipUnknownProperties ( ) : PropertyMappingConfiguration
Результат PropertyMappingConfiguration this

traverseProperties() публичный Метод

Traverse the property configuration. Only used by forProperty().
public traverseProperties ( array $splittedPropertyPath ) : PropertyMappingConfiguration
$splittedPropertyPath array
Результат PropertyMappingConfiguration (or a subclass thereof)

Описание свойств

$configuration защищенное свойство

multi-dimensional array which stores type-converter specific configuration: 1. Dimension: Fully qualified class name of the type converter 2. Dimension: Configuration Key Value: Configuration Value
protected array $configuration
Результат array

$mapUnknownProperties защищенное свойство

If TRUE, unknown properties will be mapped.
protected bool $mapUnknownProperties
Результат boolean

$mapping защищенное свойство

Keys which should be renamed
protected array $mapping
Результат array

$propertiesNotToBeMapped защищенное свойство

List of disallowed property names which will be ignored while property mapping
protected array $propertiesNotToBeMapped
Результат array

$propertiesToBeMapped защищенное свойство

List of allowed property names to be converted
protected array $propertiesToBeMapped
Результат array

$propertiesToSkip защищенное свойство

List of property names to be skipped during property mapping
protected array $propertiesToSkip
Результат array

$skipUnknownProperties защищенное свойство

If TRUE, unknown properties will be skipped during property mapping
protected bool $skipUnknownProperties
Результат boolean

$subConfigurationForProperty защищенное свойство

Stores the configuration for specific child properties.
protected array $subConfigurationForProperty
Результат array

$typeConverter защищенное свойство

protected TypeConverterInterface,Neos\Flow\Property $typeConverter
Результат Neos\Flow\Property\TypeConverterInterface