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 Batch

Default batch implementation used to convert queued items into smaller chunks of batches using a BatchDivisorIterface and transfers each batch using a Guzzle\Batch\BatchTransferInterface.

Any exception encountered during a flush operation will throw a Guzzle\Batch\Exception\BatchTransferException object containing the batch that failed. After an exception is encountered, you can flush the batch again to attempt to finish transferring any previously created batches or queued items.

Guzzle\Batch\Batch implements Guzzle\Batch\BatchInterface
Namespace: Guzzle\Batch
Located at Guzzle/Batch/Batch.php
Methods summary
public
# __construct( Guzzle\Batch\BatchTransferInterface $transferStrategy, Guzzle\Batch\BatchDivisorInterface $divisionStrategy )

Parameters

$transferStrategy
Guzzle\Batch\BatchTransferInterface
$transferStrategy Strategy used to transfer items
$divisionStrategy
Guzzle\Batch\BatchDivisorInterface
$divisionStrategy Divisor used to create batches
public Guzzle\Batch\Batch
# add( mixed $item )

Add an item to the queue

Add an item to the queue

Parameters

$item
mixed
$item Item to add

Returns

Guzzle\Batch\Batch

Implementation of

Guzzle\Batch\BatchInterface::add()
public array
# flush( )

Flush the batch and transfer the items

Flush the batch and transfer the items

Returns

array
Returns an array flushed items

Implementation of

Guzzle\Batch\BatchInterface::flush()
public boolean
# isEmpty( )

Check if the batch is empty and has further items to transfer

Check if the batch is empty and has further items to transfer

Returns

boolean

Implementation of

Guzzle\Batch\BatchInterface::isEmpty()
protected
# createBatches( )

Create batches for any queued items

Create batches for any queued items

Properties summary
protected SplQueue $queue
#

Queue of items in the queue

Queue of items in the queue

protected array $dividedBatches
#

Divided batches to be transferred

Divided batches to be transferred

protected Guzzle\Batch\BatchTransferInterface $transferStrategy
#
protected Guzzle\Batch\BatchDivisorInterface $divisionStrategy
#
php-coveralls API documentation generated by ApiGen 2.8.0