public function fromLdap($value)
{
if (!is_array($value)) {
throw new \InvalidArgumentException('This converter expects an array of values from LDAP.');
}
$this->validateCurrentAttribute($this->getOptions()['addressType']);
$addressType = $this->getArrayValue($this->getOptions()['addressType'], $this->getAttribute());
if ($this->isDefaultValueAttribute()) {
$result = $this->getDefaultAddressByType($value, $addressType);
} else {
$result = $this->getAddressesByType($value, $addressType);
}
return $result;
}