1. 8.2.x vendor/symfony/serializer/Normalizer/NormalizerInterface.php NormalizerInterface
  2. 8.0.x vendor/symfony/serializer/Normalizer/NormalizerInterface.php NormalizerInterface
  3. 8.1.x vendor/symfony/serializer/Normalizer/NormalizerInterface.php NormalizerInterface
  4. 8.3.x vendor/symfony/serializer/Normalizer/NormalizerInterface.php NormalizerInterface

Defines the interface of normalizers.

@author Jordi Boggiano <j.boggiano@seld.be>

Hierarchy

Expanded class hierarchy of NormalizerInterface

All classes that implement NormalizerInterface

8 files declare their use of NormalizerInterface
ChainEntityResolver.php in core/modules/serialization/src/EntityResolver/ChainEntityResolver.php
EntityResolverInterface.php in core/modules/serialization/src/EntityResolver/EntityResolverInterface.php
NormalizerBase.php in core/modules/serialization/src/Normalizer/NormalizerBase.php
SerializationTestNormalizer.php in core/modules/serialization/tests/serialization_test/src/SerializationTestNormalizer.php
Serializer.php in vendor/symfony/serializer/Serializer.php

... See full list

File

vendor/symfony/serializer/Normalizer/NormalizerInterface.php, line 19

Namespace

Symfony\Component\Serializer\Normalizer
View source
interface NormalizerInterface
 {
  /**
   * Normalizes an object into a set of arrays/scalars.
   *
   * @param object $object  object to normalize
   * @param string $format  format the normalization result will be encoded as
   * @param array  $context Context options for the normalizer
   *
   * @return array|scalar
   */
  public function normalize($object, $format = null, array $context = array());

  /**
   * Checks whether the given class is supported for normalization by this normalizer.
   *
   * @param mixed  $data   Data to normalize
   * @param string $format The format being (de-)serialized from or into
   *
   * @return bool
   */
  public function supportsNormalization($data, $format = null);
}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description
NormalizerInterface::normalize public function Normalizes an object into a set of arrays/scalars.
NormalizerInterface::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer.