ParserInterface.php 831 B

1234567891011121314151617181920212223242526
  1. <?php
  2. /**
  3. * Refer to LICENSE.txt distributed with the Temando Shipping module for notice of license
  4. */
  5. namespace Temando\Shipping\Rest\SchemaMapper;
  6. /**
  7. * Temando Rest Data Parser
  8. *
  9. * @package Temando\Shipping\Rest
  10. * @author Christoph Aßmann <christoph.assmann@netresearch.de>
  11. * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
  12. * @link http://www.temando.com/
  13. */
  14. interface ParserInterface
  15. {
  16. /**
  17. * Convert the string representation of a given type. The input data format
  18. * (xml, json, etc.) is handled by the concrete parser class.
  19. *
  20. * @param string $data The data to be parsed
  21. * @param string $type The type (interface) to map the data to
  22. * @return mixed The object with populated properties
  23. */
  24. public function parse($data, $type);
  25. }