DenormalizableInterface

DenormalizableInterface

interface DenormalizableInterface

Defines the most basic interface a class must implement to be denormalizable.

If a denormalizer is registered for the class and it doesn't implement the Denormalizable interfaces, the normalizer will be used instead

Methods

object denormalize(DenormalizerInterface $denormalizer, array|scalar $data, string|null $format = null, array $context = array())

Denormalizes the object back from an array of scalars|arrays.

Details

object denormalize(DenormalizerInterface $denormalizer, array|scalar $data, string|null $format = null, array $context = array())

Denormalizes the object back from an array of scalars|arrays.

It is important to understand that the denormalize() call should denormalize recursively all child objects of the implementor.

Parameters

DenormalizerInterface $denormalizer The denormalizer is given so that you can use it to denormalize objects contained within this object
array|scalar $data The data from which to re-create the object
string|null $format The format is optionally given to be able to denormalize differently based on different input formats
array $context options for denormalizing

Return Value

object

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
http://api.symfony.com/3.3/Symfony/Component/Serializer/Normalizer/DenormalizableInterface.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部