\Guzzle\BatchBatchSizeDivisor

Divides batches into smaller batches under a certain size

Summary

Methods
Properties
Constants
__construct()
setSize()
getSize()
createBatches()
No public properties found
No constants found
No protected methods found
$size
N/A
No private methods found
No private properties found
N/A

Properties

$size

$size : integer

Type

integer — Size of each batch

Methods

__construct()

__construct(integer  $size) 

Parameters

integer $size

Size of each batch

setSize()

setSize(integer  $size) : \Guzzle\Batch\BatchSizeDivisor

Set the size of each batch

Parameters

integer $size

Size of each batch

Returns

\Guzzle\Batch\BatchSizeDivisor

getSize()

getSize() : integer

Get the size of each batch

Returns

integer

createBatches()

createBatches(\SplQueue  $queue) : array|\Traversable

Divide a queue of items into an array batches

Parameters

\SplQueue $queue

Queue of items to divide into batches. Items are removed as they are iterated.

Returns

array|\Traversable —

Returns an array or Traversable object that contains arrays of items to transfer