interface NormalizerInterface

Defines the interface of normalizers.

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

Hierarchy

Expanded class hierarchy of NormalizerInterface

All classes that implement NormalizerInterface

6 files declare their use of NormalizerInterface
Dummy.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php
JsonldNormalizerBase.php in drupal/core/modules/jsonld/lib/Drupal/jsonld/JsonldNormalizerBase.php
Definition of Drupal\jsonld\JsonldNormalizerBase.
NormalizableTraversableDummy.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php
ScalarDummy.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/ScalarDummy.php
SerializationTestNormalizer.php in drupal/core/modules/system/tests/modules/serialization_test/lib/Drupal/serialization_test/SerializationTestNormalizer.php
Definition of Drupal\serialization_test\SerializationTestNormalizer.

... See full list

File

drupal/core/vendor/symfony/serializer/Symfony/Component/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
   * @return array|scalar
   */
  public function normalize($object, $format = null);

  /**
   * 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 Boolean
   */
  public function supportsNormalization($data, $format = null);

}

Members

Namesort descending Modifiers Type Description Overrides
NormalizerInterface::normalize public function Normalizes an object into a set of arrays/scalars 7
NormalizerInterface::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer 5