protected function renderCsv(array $rows, array $header, $delimiter = ',')
    {
        if (!empty($header)) {
            array_unshift($rows, $header);
        }
        // RFC 4180 (the closest thing to a CSV standard) asks for CRLF line
        // breaks, but these do not play nicely with POSIX shells whose
        // default internal field separator (IFS) does not account for CR. So
        // the line break character is forced as LF.
        $this->output->write((new Csv($delimiter, "\n"))->format($rows));
    }
protected function renderCsv(array $rows, array $header, $delimiter = ',')
    {
        if (!empty($header)) {
            array_unshift($rows, $header);
        }
        // RFC 4180 (the closest thing to a CSV standard) asks for CRLF line
        // breaks, but these do not play nicely with POSIX shells whose
        // default internal field separator (IFS) does not account for CR. So
        // the line break character is forced as LF.
        $this->output->write((new Csv($delimiter, "\n"))->format($rows));
    }
protected function renderCsv ( array $ rows , array $ header , $ delimiter = ',' ) { if ( ! empty ( $ header ) ) { array_unshift ( $ rows , $ header ) ; } // RFC 4180 (the closest thing to a CSV standard) asks for CRLF line // breaks, but these do not play nicely with POSIX shells whose // default internal field separator (IFS) does not account for CR. So // the line break character is forced as LF. $ this -> output -> write ( ( new Csv ( $ delimiter , "\n" ) ) -> format ( $ rows ) ) ; }
Render CSV output.

@param array  $rows
@param array  $header
@param string $delimiter
Render CSV output .