generatorFactory = $generatorFactory; $this->continuationWriter = $continuationWriter; } public function getIterator(): Traversable { return ($this->generatorFactory)(); } /** * Send raw bytes to the server after a command continuation request (a "+" * response) — e.g. the literal payload of an APPEND. * * Must only be called while iterating this stream, in response to a * {@see \KTXM\ProviderImap\Client\Protocol\Response\ContinuationResponse}; * the next pulled response then reflects the server's reaction to the data. */ public function respond(string $payload): void { if ($this->continuationWriter === null) { throw new ImapException('This response stream does not support continuation replies.'); } ($this->continuationWriter)($payload); } }