Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\Serializer\Normalizer; Chris@0: Chris@0: /** Chris@0: * Defines the most basic interface a class must implement to be denormalizable. Chris@0: * Chris@0: * If a denormalizer is registered for the class and it doesn't implement Chris@0: * the Denormalizable interfaces, the normalizer will be used instead Chris@0: * Chris@0: * @author Jordi Boggiano Chris@0: */ Chris@0: interface DenormalizableInterface Chris@0: { Chris@0: /** Chris@0: * Denormalizes the object back from an array of scalars|arrays. Chris@0: * Chris@0: * It is important to understand that the denormalize() call should denormalize Chris@0: * recursively all child objects of the implementor. Chris@0: * Chris@14: * @param DenormalizerInterface $denormalizer The denormalizer is given so that you Chris@14: * can use it to denormalize objects contained within this object Chris@14: * @param array|string|int|float|bool $data The data from which to re-create the object Chris@14: * @param string|null $format The format is optionally given to be able to denormalize Chris@14: * differently based on different input formats Chris@14: * @param array $context Options for denormalizing Chris@0: * Chris@0: * @return object Chris@0: */ Chris@17: public function denormalize(DenormalizerInterface $denormalizer, $data, $format = null, array $context = []); Chris@0: }