MapperInterface.php 685 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\EntityManager;
  7. /**
  8. * MapperInterface
  9. */
  10. interface MapperInterface
  11. {
  12. /**
  13. * Map entity field name to database field name
  14. *
  15. * @param string $entityType
  16. * @param array $data
  17. * @return array
  18. * @throws \Exception
  19. */
  20. public function entityToDatabase($entityType, $data);
  21. /**
  22. * Map database field name to entity field name
  23. *
  24. * @param string $entityType
  25. * @param array $data
  26. * @return array
  27. * @throws \Exception
  28. */
  29. public function databaseToEntity($entityType, $data);
  30. }