/**
 * Sets the line end style to Windows, Mac, Unix or a custom string.
 *
 * @param   string  $style  "win", "mac", "unix" or custom string.
 *
 * @return  Document instance of $this to allow chaining
 *
 * @since   1.7.0
 */
public function setLineEnd($style)
{
    switch ($style) {
        case 'win':
            $this->_lineEnd = "\r\n";
            break;
        case 'unix':
            $this->_lineEnd = "\n";
            break;
        case 'mac':
            $this->_lineEnd = "\r";
            break;
        default:
            $this->_lineEnd = $style;
    }
    return $this;
}