PHP Class 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.
Inheritance: extends AbstractTypeConverter, implements Neos\Flow\Property\TypeConverter\MediaTypeConverterInterface
Afficher le fichier Open project: neos/flow-development-collection Class Usage Examples

Protected Properties

Свойство Type Description
$priority integer This converter is not used automatically
$sourceTypes string
$targetType string

Méthodes publiques

Méthode Description
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

Méthodes protégées

Méthode Description
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

Method Details

convertFrom() public méthode

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
Résultat array

convertMediaType() protected méthode

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")
Résultat array

Property Details

$priority protected_oe property

This converter is not used automatically
protected int $priority
Résultat integer

$sourceTypes protected_oe property

protected string $sourceTypes
Résultat string

$targetType protected_oe property

protected string $targetType
Résultat string