Documentation

Batch
in package

Class to handle batched requests to the Google API service.

Note that calls to Google\Http\Batch::execute() do not clear the queued requests. To start a new batch, be sure to create a new instance of this class.

Table of Contents

Constants

BATCH_PATH  = 'batch'

Properties

$batchPath  : mixed
$boundary  : string
$client  : Client
$CONNECTION_ESTABLISHED_HEADERS  : mixed
$requests  : array<string|int, mixed>
$rootUrl  : mixed

Methods

__construct()  : mixed
add()  : mixed
execute()  : mixed
parseResponse()  : mixed
parseHttpResponse()  : array<string|int, mixed>
Used by the IO lib and also the batch processing.
parseRawHeaders()  : mixed

Constants

BATCH_PATH

public mixed BATCH_PATH = 'batch'

Properties

$batchPath

private mixed $batchPath

$boundary

private string $boundary

Multipart Boundary.

$CONNECTION_ESTABLISHED_HEADERS

private static mixed $CONNECTION_ESTABLISHED_HEADERS = array("HTTP/1.0 200 Connection established\r\n\r\n", "HTTP/1.1 200 Connection established\r\n\r\n")

$requests

private array<string|int, mixed> $requests = array()

service requests to be executed.

$rootUrl

private mixed $rootUrl

Methods

__construct()

public __construct(Client $client[, mixed $boundary = false ][, mixed $rootUrl = null ][, mixed $batchPath = null ]) : mixed
Parameters
$client : Client
$boundary : mixed = false
$rootUrl : mixed = null
$batchPath : mixed = null

execute()

public execute() : mixed

parseHttpResponse()

Used by the IO lib and also the batch processing.

private parseHttpResponse(mixed $respData, mixed $headerSize) : array<string|int, mixed>
Parameters
$respData : mixed
$headerSize : mixed
Return values
array<string|int, mixed>

parseRawHeaders()

private parseRawHeaders(mixed $rawHeaders) : mixed
Parameters
$rawHeaders : mixed

        
On this page

Search results