DecoderInterface.php 720 B

1234567891011121314151617181920212223242526272829303132
  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. * @api
  26. */
  27. function decode($data, $format);
  28. }