20 private $customerCollection;
35 $this->customerCollection = $collectionFactory->create();
36 $this->batchSize = $batchSize;
44 return $this->customerCollection->getMainTable();
52 return $this->customerCollection->getIdFieldName();
60 $this->customerCollection->addFieldToSelect($fieldName,
$alias);
69 return $this->customerCollection->getSelect();
77 $this->customerCollection->addFieldToFilter(
$attribute, $condition);
86 return $this->customerCollection->getSize();
96 $this->customerCollection->setPageSize($this->batchSize);
97 $lastPage = $this->customerCollection->getLastPageNumber();
100 $this->customerCollection->clear();
101 $this->customerCollection->setCurPage($pageNumber);
102 foreach ($this->customerCollection->getItems() as $key =>
$value) {
106 }
while ($pageNumber <= $lastPage);
addFieldToSelect($fieldName, $alias=null)
__construct(\Magento\Customer\Model\ResourceModel\Customer\Indexer\CollectionFactory $collectionFactory, $batchSize=10000)
addFieldToFilter($attribute, $condition=null)