protected function getConvertedValues($values, $attribute, $direction, AttributeConverterInterface $aggregate = null)
    {
        $values = is_array($values) ? $values : [$values];
        $converter = $this->getConverterWithOptions($this->schema->getConverter($attribute), $attribute);

        if (!$aggregate && $converter->getShouldAggregateValues() && $direction == 'toLdap') {
            $values = $this->convertAggregateValues($attribute, $values);
        } else {
            $values = $this->doConvertValues($attribute, $values, $direction, $aggregate);
        }

        return $values;
    }