ImporterInterface.php 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\App\DeploymentConfig;
  7. use Magento\Framework\Exception\State\InvalidTransitionException;
  8. /**
  9. * Interface for importers which import data from shared configuration files to appropriate data storage.
  10. */
  11. interface ImporterInterface
  12. {
  13. /**
  14. * Imports data from shared configuration files to appropriate data storage.
  15. *
  16. * @param array $data Data that should be imported
  17. * @return string[] The array of messages that generated during importing
  18. * @throws InvalidTransitionException In case of errors during importing (e.g., cannot save some data).
  19. * All changed during importing data is rolled back
  20. */
  21. public function import(array $data);
  22. /**
  23. * Returns array of warning messages that describes what changes could happen during the import.
  24. *
  25. * @param array $data Data that should be imported
  26. * @return string[] The array of warning messages
  27. */
  28. public function getWarningMessages(array $data);
  29. }