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

* If the source is an array, it is returned unchanged. * If the source is a string, is is converted depending on CONFIGURATION_STRING_FORMAT, which can be STRING_FORMAT_CSV or STRING_FORMAT_JSON. For CSV the delimiter can be set via CONFIGURATION_STRING_DELIMITER. * If the source is a PersistentResource object, it is converted to an array. The actual resource content is either embedded as base64-encoded data or saved to a file, depending on CONFIGURATION_RESOURCE_EXPORT_TYPE. For RESOURCE_EXPORT_TYPE_FILE the setting CONFIGURATION_RESOURCE_SAVE_PATH must be set as well.
Наследование: extends AbstractTypeConverter
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array Convert from $source to $targetType, a noop if the source is an array.

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

Метод Описание
getResourceExportType ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
getStringDelimiter ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
getStringFormat ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string

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

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

If it is a string it will be converted according to the configured string format.
public convertFrom ( mixed $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
$source mixed
$targetType string
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат array

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

protected getResourceExportType ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат string

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

protected getStringDelimiter ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат string

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

protected getStringFormat ( Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : string
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат string

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

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

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

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

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

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

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