Horde_Data_Base::getNewline PHP Method

getNewline() public method

Tries to determine the expected newline character based on the platform information passed by the browser's agent header.
public getNewline ( ) : string
return string The guessed expected newline characters, either \n, \r or \r\n.
    public function getNewline()
    {
        if (!isset($this->_browser)) {
            throw new LogicException('Missing browser parameter.');
        }
        switch ($this->_browser->getPlatform()) {
            case 'win':
                return "\r\n";
            case 'mac':
                return "\r";
            case 'unix':
            default:
                return "\n";
        }
    }