ElementInterface.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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\Dto;
  7. /**
  8. * Generic DTO Element interface.
  9. *
  10. * Is parent interface for all various schema structural elements:
  11. * table, column, constraint, index.
  12. * @api
  13. * @since 102.0.0
  14. */
  15. interface ElementInterface
  16. {
  17. /**
  18. * Return name of structural element.
  19. *
  20. * @return string
  21. * @since 102.0.0
  22. */
  23. public function getName();
  24. /**
  25. * Retrieve element low level type: varchar, char, foreign key, etc..
  26. *
  27. * @return string
  28. * @since 102.0.0
  29. */
  30. public function getType();
  31. /**
  32. * Retrieve high level type: column, constraint, index, table.
  33. *
  34. * On high level different elements can be created or modified in different ways.
  35. * So for each high level type of elements were created different operations.
  36. * And in order to distinguish this types of elements we use this method.
  37. *
  38. * @return string
  39. * @since 102.0.0
  40. */
  41. public function getElementType();
  42. }