IndexTableRowSizeEstimator.php 627 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Indexer;
  7. /**
  8. * Generic implementation for row size estimation.
  9. */
  10. class IndexTableRowSizeEstimator implements IndexTableRowSizeEstimatorInterface
  11. {
  12. /**
  13. * @var int
  14. */
  15. private $rowMemorySize;
  16. /**
  17. * @param int $rowMemorySize
  18. */
  19. public function __construct($rowMemorySize)
  20. {
  21. $this->rowMemorySize = $rowMemorySize;
  22. }
  23. /**
  24. * @inheritdoc
  25. */
  26. public function estimateRowSize()
  27. {
  28. return $this->rowMemorySize;
  29. }
  30. }