protected function iterateAggregates(array $toAggregate, $values, AttributeConverterInterface $converter)
{
$batches = $this->getBatchesForAttributes($toAggregate);
foreach ($batches as $index => $batch) {
/** @var Batch $batch */
$this->validateBatchAggregate($batch, $converter);
$converter->setBatch($batch);
$values = $this->getConvertedValues($batch->getValues(), $batch->getAttribute(), 'toLdap', $converter);
$converter->setLastValue($values);
if ($index !== $this->currentBatchIndex) {
$this->batches->remove($index);
}
}
return $values;
}