LdapTools\Resolver\BaseValueResolver::getConvertedValues PHP Method

getConvertedValues() protected method

Get the values for an attribute after applying any converters.
protected getConvertedValues ( mixed $values, string $attribute, string $direction, LdapTools\AttributeConverter\AttributeConverterInterface | null $aggregate = null ) : array
$values mixed
$attribute string
$direction string
$aggregate LdapTools\AttributeConverter\AttributeConverterInterface | null
return array
    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;
    }