//
    // Optional: Set useRawEnumValues to return enum values instead of enum
    //     display values.
    // $options['useRawEnumValues'] = false;
    //
    // Optional: Set includeZeroImpressions to include zero impression rows in
    //     the report output.
    // $options['includeZeroImpressions'] = true;
    // Download report.
    $reportUtils = new ReportUtils();
    $reportUtils->DownloadReportWithAwql($reportQuery, $filePath, $user, $reportFormat, $options);
    printf("Report was downloaded to '%s'.\n", $filePath);
}
// Don't run the example if the file is being included.
if (__FILE__ != realpath($_SERVER['PHP_SELF'])) {
    return;
}
try {
    // Get AdWordsUser from credentials in "../auth.ini"
    // relative to the AdWordsUser.php file's directory.
    $user = new AdWordsUser();
    // Log every SOAP XML request and response.
    $user->LogAll();
    // Download the report to a file in the same directory as the example.
    $filePath = dirname(__FILE__) . '/report.csv';
    $reportFormat = 'CSV';
    // Run the example.
    DownloadCriteriaReportWithAwqlExample($user, $filePath, $reportFormat);
} catch (Exception $e) {
    printf("An error has occurred: %s\n", $e->getMessage());
}
 public function testDownloadCriteriaReportWithAwqlExample()
 {
     $filePath = tempnam(sys_get_temp_dir(), 'report');
     DownloadCriteriaReportWithAwqlExample($this->user, $filePath);
 }