LdapTools\Ldif\Entry\LdifEntryTrait::getCommonString PHP Method

getCommonString() protected method

Get the base start of the string for a LDIF entry (comments, DN, changetype, controls).
protected getCommonString ( string | null $dn = null ) : string
$dn string | null
return string
    protected function getCommonString($dn = null)
    {
        $dn = $dn ?: $this->dn;
        $ldif = $this->addCommentsToString('');
        $ldif .= $this->getLdifLine(Ldif::DIRECTIVE_DN, $dn);
        $ldif = $this->addControlsToString($ldif);
        $ldif .= $this->getLdifLine(Ldif::DIRECTIVE_CHANGETYPE, $this->changeType);
        return $ldif;
    }