Your IP : 216.73.216.86


Current Path : /var/www/homesaver/www/bitrix/modules/catalog/lib/product/store/batchbalancer/
Upload File :
Current File : /var/www/homesaver/www/bitrix/modules/catalog/lib/product/store/batchbalancer/storetree.php

<?php
namespace Bitrix\Catalog\Product\Store\BatchBalancer;

use Bitrix\Catalog\Product\Store\BatchBalancer\Entity\StoreItem;


/**
 * Class StoreTree
 *
 * @package Bitrix\Catalog\Product\Store\BatchBalancer
 */
final class StoreTree extends InventoryTree
{
	public function push(StoreItem $item): void
	{
		$this->append($item);
	}

	public function getByHash(string $hash): ?StoreItem
	{
		foreach ($this->getIterator() as $item)
		{
			if ($item->getHash() === $hash)
			{
				return $item;
			}
		}

		return null;
	}
}