DiffInterface.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Setup\Declaration\Schema\Diff;
  7. use Magento\Framework\Setup\Declaration\Schema\Dto\ElementInterface;
  8. /**
  9. * DiffInterface is type of classes, that holds all information
  10. * that need to be changed from one installation to another.
  11. */
  12. interface DiffInterface
  13. {
  14. /**
  15. * Retrieve operations by type.
  16. *
  17. * Please note: that we wants to save history and we retrieve next structure:
  18. * [
  19. * 'column_a' => ElementHistory [
  20. * 'new' => [
  21. * ...
  22. * ],
  23. * 'old' => [
  24. * ...
  25. * ]
  26. * ]
  27. * ]
  28. *
  29. * @return array
  30. */
  31. public function getAll();
  32. /**
  33. * Register operation.
  34. *
  35. * @param ElementInterface|object $dtoObject
  36. * @param string $operation
  37. * @param ElementInterface $oldDtoObject
  38. * @return void
  39. */
  40. public function register(
  41. ElementInterface $dtoObject,
  42. $operation,
  43. ElementInterface $oldDtoObject = null
  44. );
  45. }