code/libraries/joomlatools/library/object/config/ini.php
protected static function _encodeValue($value)
    {
        $string = '';

        switch (gettype($value))
        {
            case 'integer':
            case 'double':
                $string = $value;
                break;

            case 'boolean':
                $string = $value ? 'true' : 'false';
                break;

            case 'string':
                // Sanitize any CRLF characters..
                $string = '"' . str_replace(array("\r\n", "\n"), '\\n', $value) . '"';
                break;
        }

        return $string;
    }
protected static function _encodeValue($value)
    {
        $string = '';

        switch (gettype($value))
        {
            case 'integer':
            case 'double':
                $string = $value;
                break;

            case 'boolean':
                $string = $value ? 'true' : 'false';
                break;

            case 'string':
                // Sanitize any CRLF characters..
                $string = '"' . str_replace(array("\r\n", "\n"), '\\n', $value) . '"';
                break;
        }

        return $string;
    }
protected static function _encodeValue ( $ value ) { $ string = '' ; switch ( gettype ( $ value ) ) { case 'integer' : case 'double' : $ string = $ value ; break ; case 'boolean' : $ string = $ value ? 'true' : 'false' ; break ; case 'string' : // Sanitize any CRLF characters.. $ string = '"' . str_replace ( array ( "\r\n" , "\n" ) , '\\n' , $ value ) . '"' ; break ; } return $ string ; }
Encode a value for INI.

@param  mixed $value
@return string
Encode a value for INI .