DecoderInterface.php 708 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. namespace Symfony\Component\Serializer\Encoder;
  3. use Symfony\Component\Serializer\SerializerInterface;
  4. /*
  5. * This file is part of the Symfony framework.
  6. *
  7. * (c) Fabien Potencier <fabien@symfony.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. * Defines the interface of encoders that are able to decode their own format
  14. *
  15. * @author Jordi Boggiano <j.boggiano@seld.be>
  16. */
  17. interface DecoderInterface
  18. {
  19. /**
  20. * Decodes a string into PHP data
  21. *
  22. * @param string $data data to decode
  23. * @param string $format format to decode from
  24. * @return mixed
  25. */
  26. function decode($data, $format);
  27. }