IndexHandlerInterface.php 881 B

123456789101112131415161718192021222324252627282930313233343536
  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\InventoryMultiDimensionalIndexerApi\Model;
  8. /**
  9. * Represents manipulation with index data
  10. *
  11. * @api
  12. */
  13. interface IndexHandlerInterface
  14. {
  15. /**
  16. * Add data to index
  17. *
  18. * @param IndexName $indexName
  19. * @param \Traversable $documents
  20. * @param string $connectionName
  21. * @return void
  22. */
  23. public function saveIndex(IndexName $indexName, \Traversable $documents, string $connectionName): void;
  24. /**
  25. * Remove given documents from Index
  26. *
  27. * @param IndexName $indexName
  28. * @param \Traversable $documents
  29. * @param string $connectionName
  30. * @return void
  31. */
  32. public function cleanIndex(IndexName $indexName, \Traversable $documents, string $connectionName): void;
  33. }