LdapTools\Hydrator\ArrayHydrator::convertValuesToLdap PHP Method

convertValuesToLdap() protected method

Checks for attributes assigned an attribute converter. It will replace the value with the converted value then send back all the attributes.
protected convertValuesToLdap ( array | BatchCollection | OperatorCollection $values, string | null $dn = null ) : array | BatchCollection | OperatorCollection
$values array | LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection
$dn string | null
return array | LdapTools\BatchModify\BatchCollection | LdapTools\Query\OperatorCollection
    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();
    }