public function hydrateToLdap($attributes)
{
if (!is_array($attributes)) {
throw new InvalidArgumentException('Expects an array to convert data to LDAP.');
}
$attributes = $this->mergeDefaultAttributes($attributes);
$this->validateAttributesToLdap($attributes);
$attributes = $this->resolveParameters($attributes);
$attributes = $this->convertValuesToLdap($attributes);
$attributes = $this->convertNamesToLdap($attributes);
return $attributes;
}