protected function validateObject(LdapObject $ldapObject) { if (!$ldapObject->has('dn')) { throw new InvalidArgumentException('To persist/delete/move/restore a LDAP object it must have the DN attribute.'); } }