PHP 클래스 Neos\Flow\Property\PropertyMappingConfiguration

상속: implements Neos\Flow\Property\PropertyMappingConfigurationInterface
파일 보기 프로젝트 열기: neos/flow-development-collection 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

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