33 'request' =>
'Guzzle\Batch\BatchRequestTransfer',
34 'command' =>
'Guzzle\Batch\BatchCommandTransfer'
42 public static function factory()
56 $this->autoFlush = $threshold;
68 $this->history =
true;
81 $this->exceptionBuffering =
true;
94 public function notify($callable)
96 $this->afterFlush = $callable;
111 $className = self::$mapping[
'request'];
112 $this->transferStrategy =
new $className($batchSize);
128 $className = self::$mapping[
'command'];
129 $this->transferStrategy =
new $className($batchSize);
169 public function build()
171 if (!$this->transferStrategy) {
175 if (!$this->divisorStrategy) {
179 $batch =
new Batch($this->transferStrategy, $this->divisorStrategy);
181 if ($this->exceptionBuffering) {
185 if ($this->afterFlush) {
186 $batch =
new NotifyingBatch($batch, $this->afterFlush);
189 if ($this->autoFlush) {
193 if ($this->history) {
194 $batch =
new HistoryBatch($batch);