src/LdapTools/Ldif/LdifStringBuilderTrait.php
protected function getLdifLine($directive, $value)
    {
        $separator = Ldif::KEY_VALUE_SEPARATOR;

        // Per the RFC, any value starting with a space should be base64 encoded
        if ((substr($value, 0, strlen(' ')) === ' ')) {
            $separator .= Ldif::KEY_VALUE_SEPARATOR;
            $value = base64_encode($value);
        }

        return $directive.$separator.' '.$this->getValueForLine($value).$this->lineEnding;
    }
protected function getLdifLine($directive, $value)
    {
        $separator = Ldif::KEY_VALUE_SEPARATOR;

        // Per the RFC, any value starting with a space should be base64 encoded
        if ((substr($value, 0, strlen(' ')) === ' ')) {
            $separator .= Ldif::KEY_VALUE_SEPARATOR;
            $value = base64_encode($value);
        }

        return $directive.$separator.' '.$this->getValueForLine($value).$this->lineEnding;
    }
protected function getLdifLine ( $ directive , $ value ) { $ separator = Ldif :: KEY_VALUE_SEPARATOR ; // Per the RFC, any value starting with a space should be base64 encoded if ( ( substr ( $ value , 0 , strlen ( ' ' ) ) === ' ' ) ) { $ separator .= Ldif :: KEY_VALUE_SEPARATOR ; $ value = base64_encode ( $ value ) ; } return $ directive . $ separator . ' ' . $ this -> getValueForLine ( $ value ) . $ this -> lineEnding ; }
Construct a single line of the LDIF for a given directive and value.

@param string $directive
@param string $value
@return string
Construct a single line of the LDIF for a given directive and value .