ResourceInterface.php 930 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Module;
  7. /**
  8. * Resource Model Interface
  9. */
  10. interface ResourceInterface
  11. {
  12. /**
  13. * Get Module version from DB
  14. *
  15. * @param string $moduleName
  16. * @return false|string
  17. */
  18. public function getDbVersion($moduleName);
  19. /**
  20. * Get resource data version
  21. *
  22. * @param string $moduleName
  23. * @return string|false
  24. */
  25. public function getDataVersion($moduleName);
  26. /**
  27. * Set Module version
  28. *
  29. * @param string $moduleName
  30. * @param string $version
  31. * @return int
  32. */
  33. public function setDbVersion($moduleName, $version);
  34. /**
  35. * Set resource data version
  36. *
  37. * @param string $moduleName
  38. * @param string $version
  39. * @return void
  40. */
  41. public function setDataVersion($moduleName, $version);
  42. }