src/DataExport/Format/Csv.php
public function execute($oSourceResponse, $rFile)
    {
        //  Write the field names to the file
        fwrite($rFile, $this->formatRow($oSourceResponse->getFields()));

        //  Write the data to the file
        while ($oRow = $oSourceResponse->getNextItem()) {
            fwrite($rFile, $this->formatRow($oRow));
        }
    }
public function execute($oSourceResponse, $rFile)
    {
        //  Write the field names to the file
        fwrite($rFile, $this->formatRow($oSourceResponse->getFields()));

        //  Write the data to the file
        while ($oRow = $oSourceResponse->getNextItem()) {
            fwrite($rFile, $this->formatRow($oRow));
        }
    }
Takes a SourceResponse object and transforms it into the appropriate format.

@param SourceResponse $oSourceResponse A SourceResponse object
@param resource       $rFile           The file resource to write to