Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Indexer
SaveHandler
Batch.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Indexer\SaveHandler
;
7
8
class
Batch
9
{
15
public
function
getItems
(\Traversable $documents, $size)
16
{
17
$i
= 0;
18
$batch = [];
19
20
foreach
($documents as $documentName => $documentValue) {
21
$batch[$documentName] = $documentValue;
22
if
(++
$i
== $size) {
23
yield $batch;
24
$i
= 0;
25
$batch = [];
26
}
27
}
28
if
(count($batch) > 0) {
29
yield $batch;
30
}
31
}
32
}
Magento\Framework\Indexer\SaveHandler
Definition:
Batch.php:6
Magento\Framework\Indexer\SaveHandler\Batch
Definition:
Batch.php:8
Magento\Framework\Indexer\SaveHandler\Batch\getItems
getItems(\Traversable $documents, $size)
Definition:
Batch.php:15
$i
$i
Definition:
gallery.phtml:31