PHP Класс Neos\Flow\Property\TypeConverter\TypedArrayConverter

This is a meta converter that will take an array and try to transform all elements in that array to the element type of the target array using an available type converter.
Наследование: extends AbstractTypeConverter
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$priority integer
$sourceTypes array
$targetType string

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

Метод Описание
canConvertFrom ( mixed $source, string $targetType ) : boolean
convertFrom ( array $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
getSourceChildPropertiesToBeConverted ( mixed $source ) : array Returns the source, if it is an array, otherwise an empty array.
getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string Return the type of a given sub-property inside the $targetType

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

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

public canConvertFrom ( mixed $source, string $targetType ) : boolean
$source mixed
$targetType string
Результат boolean

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

public convertFrom ( array $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
$source array An array of objects/simple types
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат array

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

Returns the source, if it is an array, otherwise an empty array.
public getSourceChildPropertiesToBeConverted ( mixed $source ) : array
$source mixed
Результат array

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

Return the type of a given sub-property inside the $targetType
public getTypeOfChildProperty ( string $targetType, string $propertyName, Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration ) : string
$targetType string
$propertyName string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат string

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

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

protected int $priority
Результат integer

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

protected array $sourceTypes
Результат array

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

protected string $targetType
Результат string