storage = $storage ?? new ArrayObject(); } /** * @inheritDoc */ public function export(iterable $batch, ?CancellationInterface $cancellation = null): FutureInterface { foreach ($batch as $record) { $this->storage[] = $record; } return new CompletedFuture(true); } public function forceFlush(?CancellationInterface $cancellation = null): bool { return true; } public function shutdown(?CancellationInterface $cancellation = null): bool { return true; } public function getStorage(): ArrayObject { return $this->storage; } }