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 interface of normalizers. Chris@0: * Chris@0: * @author Jordi Boggiano Chris@0: */ Chris@0: interface NormalizerInterface Chris@0: { Chris@0: /** Chris@0: * Normalizes an object into a set of arrays/scalars. Chris@0: * Chris@0: * @param object $object object to normalize Chris@0: * @param string $format format the normalization result will be encoded as Chris@0: * @param array $context Context options for the normalizer Chris@0: * Chris@0: * @return array|scalar Chris@0: */ Chris@0: public function normalize($object, $format = null, array $context = array()); Chris@0: Chris@0: /** Chris@0: * Checks whether the given class is supported for normalization by this normalizer. Chris@0: * Chris@0: * @param mixed $data Data to normalize Chris@0: * @param string $format The format being (de-)serialized from or into Chris@0: * Chris@0: * @return bool Chris@0: */ Chris@0: public function supportsNormalization($data, $format = null); Chris@0: }