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

This TypeConverter is used by default to decode the content of a HTTP request and it currently supports json and xml based media types as well as urlencoded content.
Наследование: extends AbstractTypeConverter, implements Neos\Flow\Property\TypeConverter\MediaTypeConverterInterface
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$priority integer This converter is not used automatically
$sourceTypes string
$targetType string

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

Метод Описание
convertFrom ( string $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array Convert the given $source to $targetType depending on the MediaTypeConverterInterface::CONFIGURATION_MEDIA_TYPE property mapping configuration

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

Метод Описание
convertMediaType ( string $requestBody, string $mediaType ) : array Converts the given request body according to the specified media type Override this method in your custom TypeConverter to support additional media types

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

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

Convert the given $source to $targetType depending on the MediaTypeConverterInterface::CONFIGURATION_MEDIA_TYPE property mapping configuration
public convertFrom ( string $source, string $targetType, array $convertedChildProperties = [], Neos\Flow\Property\PropertyMappingConfigurationInterface $configuration = null ) : array
$source string the raw request body
$targetType string must be "array"
$convertedChildProperties array
$configuration Neos\Flow\Property\PropertyMappingConfigurationInterface
Результат array

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

Converts the given request body according to the specified media type Override this method in your custom TypeConverter to support additional media types
protected convertMediaType ( string $requestBody, string $mediaType ) : array
$requestBody string the raw request body
$mediaType string the configured media type (for example "application/json")
Результат array

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

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

This converter is not used automatically
protected int $priority
Результат integer

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

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

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

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