PHP Class BatchJobUtilsDelegate, googleads-php-lib

Use BatchJobUtils to upload batch operations and download the results of batch processing.
Afficher le fichier Open project: googleads/googleads-php-lib

Méthodes publiques

Méthode Description
DownloadBatchJobResults ( $downloadUrl )
UploadIncrementalBatchJobOperations ( array $operations, $isLastRequest = null )
__construct ( string $uploadUrl, integer $totalContentBytes = null, CurlUtils $curlUtils = null ) Create an instance of BatchJobUtils with the specified upload URL, total uploaded content bytes, and CurlUtils object.

Private Methods

Méthode Description
InitiateResumableUpload ( string $uploadUrl ) : string Initiates the resumable upload by sending a request to Google Cloud Storage.
PostProcessContent ( string $content, boolean $isFirstRequest, boolean $isLastRequest ) : string Post-processes the request content to conform to the requirements of Google Cloud Storage.
PrepareIncrementalUploadRequest ( array $operations, boolean $isLastRequest ) : array Creates the HTTP headers and body for incremental upload request that will be used to upload batch operations to. Content-Length and Content-Range are required for incremental upload.
TrimStartEndElements ( string $content, boolean $isFirstRequest, boolean $isLastRequest ) : string Returns the request content with the start or end mutate element removed, depending on whether the request is the first and/or last request.

Method Details

DownloadBatchJobResults() public méthode

See also: BatchJobUtils::DownloadBatchJobResults
public DownloadBatchJobResults ( $downloadUrl )

UploadIncrementalBatchJobOperations() public méthode

See also: BatchJobUtils::UploadIncrementalBatchJobOperations
public UploadIncrementalBatchJobOperations ( array $operations, $isLastRequest = null )
$operations array

__construct() public méthode

Create an instance of BatchJobUtils with the specified upload URL, total uploaded content bytes, and CurlUtils object.
public __construct ( string $uploadUrl, integer $totalContentBytes = null, CurlUtils $curlUtils = null )
$uploadUrl string the upload URL to which the operations will be uploaded
$totalContentBytes integer the total content bytes uploaded so far, used in incremental batch job uploads
$curlUtils CurlUtils the CurlUtils object for uploading batch job operations and downloading the results of batch job processing