src/LdapTools/Resolver/BaseValueResolver.php
protected function doConvertValues($attribute, array $values, $direction, AttributeConverterInterface $aggregate = null)
    {
        $converter = $aggregate ?: $this->getConverterWithOptions($this->schema->getConverter($attribute), $attribute);
        $converter->setAttribute($attribute);

        if ($converter->isMultiValuedConverter()) {
            $values = $converter->$direction($values);
        } else {
            foreach ($values as $index => $value) {
                $values[$index] = $converter->$direction($value);
            }
        }
        if ($converter instanceof OperationGeneratorInterface && $converter->getRemoveOriginalValue() && !in_array($attribute, $this->remove)) {
            $this->remove[] = $attribute;
        }

        return $values;
    }
protected function doConvertValues($attribute, array $values, $direction, AttributeConverterInterface $aggregate = null)
    {
        $converter = $aggregate ?: $this->getConverterWithOptions($this->schema->getConverter($attribute), $attribute);
        $converter->setAttribute($attribute);

        if ($converter->isMultiValuedConverter()) {
            $values = $converter->$direction($values);
        } else {
            foreach ($values as $index => $value) {
                $values[$index] = $converter->$direction($value);
            }
        }
        if ($converter instanceof OperationGeneratorInterface && $converter->getRemoveOriginalValue() && !in_array($attribute, $this->remove)) {
            $this->remove[] = $attribute;
        }

        return $values;
    }
protected function doConvertValues ( $ attribute , array $ values , $ direction , AttributeConverterInterface $ aggregate = null ) { $ converter = $ aggregate ? : $ this -> getConverterWithOptions ( $ this -> schema -> getConverter ( $ attribute ) , $ attribute ) ; $ converter -> setAttribute ( $ attribute ) ; if ( $ converter -> isMultiValuedConverter ( ) ) { $ values = $ converter -> $ direction ( $ values ) ; } else { foreach ( $ values as $ index => $ value ) { $ values [ $ index ] = $ converter -> $ direction ( $ value ) ; } } if ( $ converter instanceof OperationGeneratorInterface && $ converter -> getRemoveOriginalValue ( ) && ! in_array ( $ attribute , $ this -> remove ) ) { $ this -> remove [ ] = $ attribute ; } return $ values ; }
Convert a set of values for an attribute.

@param string $attribute
@param array $values
@param string $direction
@param AttributeConverterInterface|null $aggregate
@return mixed
Convert a set of values for an attribute .