decoratedBatch->isEmpty()) { try { $transferredItems = $this->decoratedBatch->flush(); } catch (BatchTransferException $e) { $this->exceptions[] = $e; $transferredItems = $e->getTransferredItems(); } $items = array_merge($items, $transferredItems); } return $items; } /** * Get the buffered exceptions * * @return array Array of BatchTransferException objects */ public function getExceptions() { return $this->exceptions; } /** * Clear the buffered exceptions */ public function clearExceptions() { $this->exceptions = array(); } }