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

10 files declare their use of NormalizerInterface
ChainEntityResolver.php in drupal/core/modules/serialization/lib/Drupal/serialization/EntityResolver/ChainEntityResolver.php
Contains \Drupal\serialization\EntityResolver\ChainEntityResolver
Dummy.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/Dummy.php
EntityResolverInterface.php in drupal/core/modules/serialization/lib/Drupal/serialization/EntityResolver/EntityResolverInterface.php
Contains \Drupal\serialization\EntityResolver\EntityResolverInterface
NormalizableTraversableDummy.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Fixtures/NormalizableTraversableDummy.php
NormalizerBase.php in drupal/core/modules/serialization/lib/Drupal/serialization/Normalizer/NormalizerBase.php
Contains \Drupal\serialization\Normalizer\NormalizerBase.

... 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
   * @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 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 11
NormalizerInterface::supportsNormalization public function Checks whether the given class is supported for normalization by this normalizer 6