AbstractNormalizerDummy.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\Serializer\Tests\Fixtures;
  11. use Symfony\Component\Serializer\Normalizer\AbstractNormalizer;
  12. /**
  13. * Provides a dummy Normalizer which extends the AbstractNormalizer.
  14. *
  15. * @author Konstantin S. M. Möllers <ksm.moellers@gmail.com>
  16. */
  17. class AbstractNormalizerDummy extends AbstractNormalizer
  18. {
  19. /**
  20. * {@inheritdoc}
  21. */
  22. public function getAllowedAttributes($classOrObject, array $context, $attributesAsString = false)
  23. {
  24. return parent::getAllowedAttributes($classOrObject, $context, $attributesAsString);
  25. }
  26. /**
  27. * {@inheritdoc}
  28. */
  29. public function normalize($object, $format = null, array $context = array())
  30. {
  31. }
  32. /**
  33. * {@inheritdoc}
  34. */
  35. public function supportsNormalization($data, $format = null)
  36. {
  37. return true;
  38. }
  39. /**
  40. * {@inheritdoc}
  41. */
  42. public function denormalize($data, $class, $format = null, array $context = array())
  43. {
  44. }
  45. /**
  46. * {@inheritdoc}
  47. */
  48. public function supportsDenormalization($data, $type, $format = null)
  49. {
  50. return true;
  51. }
  52. }