/** * Figures out what to add to the LDIF entry for a specific key/value directive given. * * @param string $key * @param string $value * @param LdifEntryInterface $entry */ protected function addDirectiveToEntry($key, $value, LdifEntryInterface $entry) { if ($entry instanceof LdifEntryAdd) { $entry->addAttribute($key, $value); } elseif ($entry instanceof LdifEntryModDn) { $this->addModDnDirective($entry, $key, $value); } elseif ($entry instanceof LdifEntryModify) { $this->addModifyDirective($entry, $key, $value); } }
/** * @param LdifEntryInterface $entry */ protected function setupEntry(LdifEntryInterface $entry) { if (!is_null($entry->getType()) && $entry instanceof SchemaAwareInterface) { $entry->setLdapObjectSchema($this->getSchemaForType($entry->getType())); } if ($entry instanceof LdapAwareInterface) { $entry->setLdapConnection($this->connection); } $entry->setLineEnding($this->lineEnding); $entry->setLineFolding($this->lineFolding); $entry->setMaxLineLength($this->maxLineLength); }