LdapTools\Ldif\Entry\LdifEntryModDn::setNewRdn PHP Метод

setNewRdn() публичный Метод

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

Пример #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);
     }
 }