protected function getLdifEntryObject($dn, $changeType) { if (!array_key_exists($changeType, $this->changeTypeMap)) { $this->throwException(sprintf('The changetype "%s" is invalid', $changeType)); } return new $this->changeTypeMap[$changeType]($dn); }