public function output(string $filename = null): int
    {
        if (null !== $filename) {
            $this->sendHeaders($filename);
        }
        $input_bom = $this->getInputBOM();
        $this->document->rewind();
        $this->document->fseek(strlen($input_bom));
        echo $this->output_bom;

        return strlen($this->output_bom) + $this->document->fpassthru();
    }
public function output(string $filename = null): int
    {
        if (null !== $filename) {
            $this->sendHeaders($filename);
        }
        $input_bom = $this->getInputBOM();
        $this->document->rewind();
        $this->document->fseek(strlen($input_bom));
        echo $this->output_bom;

        return strlen($this->output_bom) + $this->document->fpassthru();
    }
public function output ( string $ filename = null ) : int { if ( null !== $ filename ) { $ this -> sendHeaders ( $ filename ) ; } $ input_bom = $ this -> getInputBOM ( ) ; $ this -> document -> rewind ( ) ; $ this -> document -> fseek ( strlen ( $ input_bom ) ) ; echo $ this -> output_bom ; return strlen ( $ this -> output_bom ) + $ this -> document -> fpassthru ( ) ; }
Outputs all data on the CSV file.

@return int Returns the number of characters read from the handle
and passed through to the output.
Outputs all data on the CSV file .