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 normalizable. Chris@0: * Chris@0: * If a normalizer is registered for the class and it doesn't implement Chris@0: * the Normalizable interfaces, the normalizer will be used instead. Chris@0: * Chris@0: * @author Jordi Boggiano Chris@0: */ Chris@0: interface NormalizableInterface Chris@0: { Chris@0: /** Chris@0: * Normalizes the object into an array of scalars|arrays. Chris@0: * Chris@0: * It is important to understand that the normalize() call should normalize Chris@0: * recursively all child objects of the implementor. Chris@0: * Chris@0: * @param NormalizerInterface $normalizer The normalizer is given so that you Chris@14: * can use it to normalize objects contained within this object Chris@0: * @param string|null $format The format is optionally given to be able to normalize differently Chris@14: * based on different output formats Chris@0: * @param array $context Options for normalizing this object Chris@0: * Chris@14: * @return array|string|int|float|bool Chris@0: */ Chris@17: public function normalize(NormalizerInterface $normalizer, $format = null, array $context = []); Chris@0: }