original_string: public function exportReports(
          $reportId,
          $format = 'php',
          $rawOrLabel = 'raw',
          $rawOrLabelHeaders = 'raw',
          $exportCheckboxLabel = false
      ) {
          $data = array(
                  'token' => $this->apiToken,
                  'content' => 'report',
                  'returnFormat' => 'json'
          );
          
          #------------------------------------------------
          # Process arguments
          #------------------------------------------------
          $data['report_id'] = $this->processReportIdArgument($reportId);
  
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
  
          $data['rawOrLabel']          = $this->processRawOrLabelArgument($rawOrLabel);
          $data['rawOrLabelHeaders']   = $this->processRawOrLabelHeadersArgument($rawOrLabelHeaders);
          $data['exportCheckboxLabel'] = $this->processExportCheckboxLabelArgument($exportCheckboxLabel);
          
          #---------------------------------------------------
          # Get and process records
          #---------------------------------------------------
          $records = $this->connection->callWithArray($data);
          $records = $this->processExportResult($records, $format);
           
          return $records;
      }
code: public function exportReports(
          $reportId,
          $format = 'php',
          $rawOrLabel = 'raw',
          $rawOrLabelHeaders = 'raw',
          $exportCheckboxLabel = false
      ) {
          $data = array(
                  'token' => $this->apiToken,
                  'content' => 'report',
                  'returnFormat' => 'json'
          );
          
          #------------------------------------------------
          # Process arguments
          #------------------------------------------------
          $data['report_id'] = $this->processReportIdArgument($reportId);
  
          $legalFormats = array('csv', 'json', 'php', 'xml');
          $data['format'] = $this->processFormatArgument($format, $legalFormats);
  
          $data['rawOrLabel']          = $this->processRawOrLabelArgument($rawOrLabel);
          $data['rawOrLabelHeaders']   = $this->processRawOrLabelHeadersArgument($rawOrLabelHeaders);
          $data['exportCheckboxLabel'] = $this->processExportCheckboxLabelArgument($exportCheckboxLabel);
          
          #---------------------------------------------------
          # Get and process records
          #---------------------------------------------------
          $records = $this->connection->callWithArray($data);
          $records = $this->processExportResult($records, $format);
           
          return $records;
      }
code_tokens: public function exportReports ( $ reportId , $ format = 'php' , $ rawOrLabel = 'raw' , $ rawOrLabelHeaders = 'raw' , $ exportCheckboxLabel = false ) { $ data = array ( 'token' => $ this -> apiToken , 'content' => 'report' , 'returnFormat' => 'json' ) ; #------------------------------------------------ # Process arguments #------------------------------------------------ $ data [ 'report_id' ] = $ this -> processReportIdArgument ( $ reportId ) ; $ legalFormats = array ( 'csv' , 'json' , 'php' , 'xml' ) ; $ data [ 'format' ] = $ this -> processFormatArgument ( $ format , $ legalFormats ) ; $ data [ 'rawOrLabel' ] = $ this -> processRawOrLabelArgument ( $ rawOrLabel ) ; $ data [ 'rawOrLabelHeaders' ] = $ this -> processRawOrLabelHeadersArgument ( $ rawOrLabelHeaders ) ; $ data [ 'exportCheckboxLabel' ] = $ this -> processExportCheckboxLabelArgument ( $ exportCheckboxLabel ) ; #--------------------------------------------------- # Get and process records #--------------------------------------------------- $ records = $ this -> connection -> callWithArray ( $ data ) ; $ records = $ this -> processExportResult ( $ records , $ format ) ; return $ records ; }
docstring: Exports the records produced by the specified report.
  
  @param mixed $reportId integer or numeric string ID of the report to use.
  @param string $format output data format.
  <ul>
  <li> 'php' - [default] array of maps of values</li>
  <li> 'csv' - string of CSV (comma-separated values)</li>
  <li> 'json' - string of JSON encoded values</li>
  <li> 'xml' - string of XML encoded data</li>
  </ul>
  @param string $rawOrLabel indicates what should be exported for options of multiple choice fields:
  <ul>
  <li> 'raw' - [default] export the raw coded values</li>
  <li> 'label' - export the labels</li>
  </ul>
  @param string $rawOrLabelHeaders when exporting with 'csv' format 'flat' type, indicates what format
  should be used for the CSV headers:
  <ul>
  <li> 'raw' - [default] export the variable/field names</li>
  <li> 'label' - export the field labels</li>
  </ul>
  @param boolean $exportCheckboxLabel specifies the format for checkbox fields for the case where
  $format = 'csv', $rawOrLabel = true, and $type = 'flat'. For other cases this
  parameter is effectively ignored.
  <ul>
  <li> true - checked checkboxes will have a value equal to the checkbox option's label
  (e.g., 'Choice 1'), and unchecked checkboxes will have a blank value.
  </li>
  <li> false - [default] checked checkboxes will have a value of 'Checked', and
  unchecked checkboxes will have a value of 'Unchecked'.
  </li>
  </ul>
  
  @return mixed the records generated by the specefied report in the specified format.
docstring_tokens: Exports the records produced by the specified report .