ModeSwitcherInterface.php 704 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Indexer\Model;
  8. /**
  9. * Interface to switch indexer mode
  10. */
  11. interface ModeSwitcherInterface
  12. {
  13. /**
  14. * Returns data object that contains dimension modes
  15. *
  16. * @return DimensionModes
  17. */
  18. public function getDimensionModes(): DimensionModes;
  19. /**
  20. * Switch dimension mode
  21. *
  22. * @param string $currentMode
  23. * @param string $previousMode
  24. * @throws \InvalidArgumentException
  25. * @throws \Zend_Db_Exception
  26. * @return void
  27. */
  28. public function switchMode(string $currentMode, string $previousMode);
  29. }