protected function getConvertedValues($values, $attribute, $direction, $aggregate = null)
{
$values = is_array($values) ? $values : [$values];
$converter = is_null($aggregate) ? $this->getConverterWithOptions($this->schema->getConverter($attribute)) : $aggregate;
if (is_null($aggregate) && $converter->getShouldAggregateValues() && $direction == 'toLdap') {
$values = $this->convertAggregateValues($attribute, $values, $converter);
} else {
$values = $this->doConvertValues($attribute, $values, $direction, $aggregate);
}
if ($converter instanceof OperationGeneratorInterface && $converter->getRemoveOriginalValue()) {
$this->remove[] = $attribute;
}
return $values;
}