protected function addModifyDirective(LdifEntryModify $entry, $key, $value)
{
$this->validateDirectiveInChange(LdifEntryInterface::TYPE_MODIFY, $key);
$this->nextLine();
if ($key == LdifEntryModify::DIRECTIVE_ADD) {
$values = $this->getValuesForModifyAction($value, 'adding');
$entry->add($value, $values);
} elseif ($key == LdifEntryModify::DIRECTIVE_DELETE) {
$values = $this->getValuesForModifyAction($value, 'deleting');
if (empty($values)) {
$entry->reset($value);
} else {
$entry->delete($value, $values);
}
} elseif ($key == LdifEntryModify::DIRECTIVE_REPLACE) {
$values = $this->getValuesForModifyAction($value, 'replacing');
$entry->replace($value, $values);
}
}