public function setValues(array $values = [])
{
$this->values = array_map(function ($value) {
// We need to make sure all values given to a batch modification are
// strings, otherwise we'll receive an LDAP exception when
// we try to process the modification.
return (string) $value;
}, $values);
return $this;
}
/** * Removes an entry from the current group. * * @param string|Entry $entry * * @return bool */ public function removeMember($entry) { if ($entry instanceof Entry) { $entry = $entry->getDn(); } $modification = new BatchModification(); $modification->setAttribute($this->schema->member()); $modification->setType(LDAP_MODIFY_BATCH_REMOVE); $modification->setValues([$entry]); $this->addModification($modification); return $this->save(); }