public function toArray() { $batch = ['attrib' => $this->attribute, 'modtype' => $this->modtype]; if (!($this->modtype === LDAP_MODIFY_BATCH_REMOVE_ALL)) { $batch['values'] = $this->resolve($this->values); } return $batch; }