AbstractNormalizer.php 819 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Symfony\Component\Serializer\Normalizer;
  3. use Symfony\Component\Serializer\SerializerInterface;
  4. /*
  5. * This file is part of the Symfony framework.
  6. *
  7. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  8. *
  9. * This source file is subject to the MIT license that is bundled
  10. * with this source code in the file LICENSE.
  11. */
  12. /**
  13. * Abstract Normalizer implementation
  14. *
  15. * @author Jordi Boggiano <j.boggiano@seld.be>
  16. */
  17. abstract class AbstractNormalizer implements NormalizerInterface
  18. {
  19. protected $serializer;
  20. /**
  21. * {@inheritdoc}
  22. */
  23. public function setSerializer(SerializerInterface $serializer)
  24. {
  25. $this->serializer = $serializer;
  26. }
  27. /**
  28. * {@inheritdoc}
  29. */
  30. public function getSerializer()
  31. {
  32. return $this->serializer;
  33. }
  34. }