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;
}
/** * @param AddOperation $operation */ protected function hydrateAddOperation(AddOperation $operation) { $this->setDefaultParameters(); $operation->setAttributes(parent::hydrateToLdap($operation->getAttributes())); $this->setDnToUse($operation); $operation->setAttributes($this->filterAttributeValues($operation->getAttributes())); }