protected function convertValuesToLdap($values, $dn = null)
    {
        if (!($values instanceof OperatorCollection) && !$this->schema) {
            return $values;
        }
        $valueResolver = BaseValueResolver::getInstance(
            $this->schema,
            $values,
            $this->type
        );
        $this->configureValueResolver($valueResolver, $dn);

        return $valueResolver->toLdap();
    }