src/LdapTools/Ldif/LdifStringBuilderTrait.php
protected function getValueForLine($value)
    {
        /**
         * Is this the correct way to do line folding? If a folded line starts/ends with a space should the value,
         * and this every line, be base64 encoded? Reading the RFC this does not seem clear.
         */
        if ($this->lineFolding) {
            $value = implode(
                $this->lineEnding." ",
                str_split($value, $this->maxLineLength)
            );
        }

        return $value;
    }
protected function getValueForLine($value)
    {
        /**
         * Is this the correct way to do line folding? If a folded line starts/ends with a space should the value,
         * and this every line, be base64 encoded? Reading the RFC this does not seem clear.
         */
        if ($this->lineFolding) {
            $value = implode(
                $this->lineEnding." ",
                str_split($value, $this->maxLineLength)
            );
        }

        return $value;
    }
protected function getValueForLine ( $ value ) { /**
         * Is this the correct way to do line folding? If a folded line starts/ends with a space should the value,
         * and this every line, be base64 encoded? Reading the RFC this does not seem clear.
         */ if ( $ this -> lineFolding ) { $ value = implode ( $ this -> lineEnding . " " , str_split ( $ value , $ this -> maxLineLength ) ) ; } return $ value ; }
Gets the value for the line while taking into account any line folding set.

@param $value
@return string
Gets the value for the line while taking into account any line folding set .