src/LdapTools/Ldif/Entry/LdifEntryTrait.php
protected function addControlsToString($ldif)
    {
        foreach ($this->controls as $control) {
            $value = $control->getOid().' '.$control->getCriticality();
            if (!is_null($control->getValue())) {
                $value .= ' '.$control->getValue();
            }
            $ldif .= $this->getLdifLine(Ldif::DIRECTIVE_CONTROL, $value);
        }

        return $ldif;
    }
protected function addControlsToString($ldif)
    {
        foreach ($this->controls as $control) {
            $value = $control->getOid().' '.$control->getCriticality();
            if (!is_null($control->getValue())) {
                $value .= ' '.$control->getValue();
            }
            $ldif .= $this->getLdifLine(Ldif::DIRECTIVE_CONTROL, $value);
        }

        return $ldif;
    }
protected function addControlsToString ( $ ldif ) { foreach ( $ this -> controls as $ control ) { $ value = $ control -> getOid ( ) . ' ' . $ control -> getCriticality ( ) ; if ( ! is_null ( $ control -> getValue ( ) ) ) { $ value .= ' ' . $ control -> getValue ( ) ; } $ ldif .= $ this -> getLdifLine ( Ldif :: DIRECTIVE_CONTROL , $ value ) ; } return $ ldif ; }
Add any LDAP controls to the specified LDIF.

@param string $ldif
@return string
Add any LDAP controls to the specified LDIF .