Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • AbstractBatchDecorator
  • Batch
  • BatchBuilder
  • BatchClosureDivisor
  • BatchClosureTransfer
  • BatchCommandTransfer
  • BatchRequestTransfer
  • BatchSizeDivisor
  • ExceptionBufferingBatch
  • FlushingBatch
  • HistoryBatch
  • NotifyingBatch

Interfaces

  • BatchDivisorInterface
  • BatchInterface
  • BatchTransferInterface
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class BatchBuilder

Builder used to create custom batch objects

Namespace: Guzzle\Batch
Located at Guzzle/Batch/BatchBuilder.php
Methods summary
public static Guzzle\Batch\BatchBuilder
# factory( )

Create a new instance of the BatchBuilder

Create a new instance of the BatchBuilder

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# autoFlushAt( mixed $threshold )

Automatically flush the batch when the size of the queue reaches a certain threshold. Adds Guzzle\Batch\FlushingBatch.

Automatically flush the batch when the size of the queue reaches a certain threshold. Adds Guzzle\Batch\FlushingBatch.

Parameters

$threshold
mixed
$threshold Number of items to allow in the queue before a flush

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# keepHistory( )

Maintain a history of all items that have been transferred using the batch. Adds Guzzle\Batch\HistoryBatch.

Maintain a history of all items that have been transferred using the batch. Adds Guzzle\Batch\HistoryBatch.

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# bufferExceptions( )

Buffer exceptions thrown during transfer so that you can transfer as much as possible, and after a transfer completes, inspect each exception that was thrown. Enables the Guzzle\Batch\ExceptionBufferingBatch decorator.

Buffer exceptions thrown during transfer so that you can transfer as much as possible, and after a transfer completes, inspect each exception that was thrown. Enables the Guzzle\Batch\ExceptionBufferingBatch decorator.

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# notify( mixed $callable )

Notify a callable each time a batch flush completes. Enables the Guzzle\Batch\NotifyingBatch decorator.

Notify a callable each time a batch flush completes. Enables the Guzzle\Batch\NotifyingBatch decorator.

Parameters

$callable
mixed
$callable Callable function to notify

Returns

Guzzle\Batch\BatchBuilder

Throws

Guzzle\Common\Exception\InvalidArgumentException
if the argument is not callable
public Guzzle\Batch\BatchBuilder
# transferRequests( integer $batchSize = 50 )

Configures the batch to transfer batches of requests. Associates a \Guzzle\Http\BatchRequestTransfer object as both the transfer and divisor strategy.

Configures the batch to transfer batches of requests. Associates a \Guzzle\Http\BatchRequestTransfer object as both the transfer and divisor strategy.

Parameters

$batchSize
integer
$batchSize Batch size for each batch of requests

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# transferCommands( integer $batchSize = 50 )

Configures the batch to transfer batches commands. Associates as \Guzzle\Service\Command\BatchCommandTransfer as both the transfer and divisor strategy.

Configures the batch to transfer batches commands. Associates as \Guzzle\Service\Command\BatchCommandTransfer as both the transfer and divisor strategy.

Parameters

$batchSize
integer
$batchSize Batch size for each batch of commands

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# createBatchesWith( Guzzle\Batch\BatchDivisorInterface $divisorStrategy )

Specify the strategy used to divide the queue into an array of batches

Specify the strategy used to divide the queue into an array of batches

Parameters

$divisorStrategy
Guzzle\Batch\BatchDivisorInterface
$divisorStrategy Strategy used to divide a batch queue into batches

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchBuilder
# transferWith( Guzzle\Batch\BatchTransferInterface $transferStrategy )

Specify the strategy used to transport the items when flush is called

Specify the strategy used to transport the items when flush is called

Parameters

$transferStrategy
Guzzle\Batch\BatchTransferInterface
$transferStrategy How items are transferred

Returns

Guzzle\Batch\BatchBuilder
public Guzzle\Batch\BatchInterface
# build( )

Create and return the instantiated batch

Create and return the instantiated batch

Returns

Guzzle\Batch\BatchInterface

Throws

Guzzle\Common\Exception\RuntimeException
if no transfer strategy has been specified
Properties summary
protected boolean $autoFlush false
#

Whether or not the batch should automatically flush

Whether or not the batch should automatically flush

protected boolean $history false
#

Whether or not to maintain a batch history

Whether or not to maintain a batch history

protected boolean $exceptionBuffering false
#

Whether or not to buffer exceptions encountered in transfer

Whether or not to buffer exceptions encountered in transfer

protected mixed $afterFlush
#

Callable to invoke each time a flush completes

Callable to invoke each time a flush completes

protected Guzzle\Batch\BatchTransferInterface $transferStrategy
#

Object used to transfer items in the queue

Object used to transfer items in the queue

protected Guzzle\Batch\BatchDivisorInterface $divisorStrategy
#

Object used to divide the queue into batches

Object used to divide the queue into batches

protected static array $mapping array( 'request' => 'Guzzle\Batch\BatchRequestTransfer', 'command' => 'Guzzle\Batch\BatchCommandTransfer' )
#

of Mapped transfer strategies by handle name

of Mapped transfer strategies by handle name

php-coveralls API documentation generated by ApiGen 2.8.0