LdapTools\Ldif\Entry\LdifEntryModDn::setNewRdn PHP Method

setNewRdn() public method

Set the new RDN (ie. name) for the LDAP object (in the form of "CN=NewName" or similar).
public setNewRdn ( string $rdn )
$rdn string
    public function setNewRdn($rdn)
    {
        $this->newRdn = $rdn;
        return $this;
    }

Usage Example

Beispiel #1
0
 /**
  * @param LdifEntryModDn $entry
  * @param string $key
  * @param string $value
  * @throws LdifParserException
  */
 protected function addModDnDirective(LdifEntryModDn $entry, $key, $value)
 {
     $this->validateDirectiveInChange(LdifEntryInterface::TYPE_MODDN, $key);
     if ($key == LdifEntryModDn::DIRECTIVE_DELETEOLDRDN) {
         $entry->setDeleteOldRdn($this->getBoolFromStringInt($value));
     } elseif ($key == LdifEntryModDn::DIRECTIVE_NEWRDN) {
         $entry->setNewRdn($value);
     } elseif ($key == LdifEntryModDn::DIRECTIVE_NEWSUPERIOR) {
         $entry->setNewLocation($value);
     }
 }