PHP Class Neos\Flow\Property\TypeConverter\AbstractTypeConverter

- set $sourceTypes - set $targetType - set $priority - implement convertFrom()
Inheritance: implements Neos\Flow\Property\TypeConverterInterface
Afficher le fichier Open project: neos/flow-development-collection

Protected Properties

Свойство Type Description
$priority integer The priority for this converter.
$sourceTypes array The source types this converter can convert.
$targetType string The target type this converter can convert to.

Méthodes publiques

Méthode Description
canConvertFrom ( mixed $source, string $targetType ) : boolean This implementation always returns TRUE for this method.
getPriority ( ) : integer Return the priority of this TypeConverter. TypeConverters with a high priority are chosen before low priority.
getSourceChildPropertiesToBeConverted ( mixed $source ) : array Returns an empty list of sub property names
getSupportedSourceTypes ( ) : array Returns the list of source types the TypeConverter can handle.
getSupportedTargetType ( ) : string Return the target type this TypeConverter converts to.
getTargetTypeForSource ( mixed $source, string $originalTargetType, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string Returns the $originalTargetType unchanged in this implementation.
getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string This method is never called, as getSourceChildPropertiesToBeConverted() returns an empty array.

Method Details

canConvertFrom() public méthode

This implementation always returns TRUE for this method.
public canConvertFrom ( mixed $source, string $targetType ) : boolean
$source mixed the source data
$targetType string the type to convert to.
Résultat boolean TRUE if this TypeConverter can convert from $source to $targetType, FALSE otherwise.

getPriority() public méthode

Return the priority of this TypeConverter. TypeConverters with a high priority are chosen before low priority.
public getPriority ( ) : integer
Résultat integer

getSourceChildPropertiesToBeConverted() public méthode

Returns an empty list of sub property names
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array
$source mixed
Résultat array

getSupportedSourceTypes() public méthode

Must be PHP simple types, classes or object is not allowed.
public getSupportedSourceTypes ( ) : array
Résultat array

getSupportedTargetType() public méthode

Can be a simple type or a class name.
public getSupportedTargetType ( ) : string
Résultat string

getTargetTypeForSource() public méthode

Returns the $originalTargetType unchanged in this implementation.
public getTargetTypeForSource ( mixed $source, string $originalTargetType, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
$source mixed the source data
$originalTargetType string the type we originally want to convert to
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Résultat string

getTypeOfChildProperty() public méthode

This method is never called, as getSourceChildPropertiesToBeConverted() returns an empty array.
public getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string
$targetType string
$propertyName string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Résultat string

Property Details

$priority protected_oe property

The priority for this converter.
protected int $priority
Résultat integer

$sourceTypes protected_oe property

The source types this converter can convert.
protected array $sourceTypes
Résultat array

$targetType protected_oe property

The target type this converter can convert to.
protected string $targetType
Résultat string