CSV::getLineEndingChar PHP Method

getLineEndingChar() private method

return a string: "Windows", "Unix" or "Mac"
private getLineEndingChar ( )
    private function getLineEndingChar()
    {
        $type = "";
        if ($this->genEnvironment == Constants::GEN_ENVIRONMENT_API) {
            $type = $this->userSettings->export->settings->eol;
        } else {
            $type = $this->userSettings["etCSV_lineEndings"];
        }
        $newline = "";
        switch ($type) {
            case "Windows":
                $newline = "\r\n";
                break;
            case "Unix":
                $newline = "\n";
                break;
            case "Mac":
            default:
                $newline = "\r";
                break;
        }
        return $newline;
    }