class TestNormalizer

Provides a test Normalizer which only implements the NormalizerInterface.

@author Lin Clark <lin@lin-clark.com>

Hierarchy

Expanded class hierarchy of TestNormalizer

1 file declares its use of TestNormalizer
SerializerTest.php in drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/SerializerTest.php

File

drupal/core/vendor/symfony/serializer/Symfony/Component/Serializer/Tests/Normalizer/TestNormalizer.php, line 21

Namespace

Symfony\Component\Serializer\Tests\Normalizer
View source
class TestNormalizer implements NormalizerInterface {

  /**
   * {@inheritdoc}
   */
  public function normalize($object, $format = null, array $context = array()) {
  }

  /**
   * {@inheritdoc}
   */
  public function supportsNormalization($data, $format = null) {
    return true;
  }

}

Members

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