generated from Nodarx/template
feat: implement download
Signed-off-by: Sebastian Krupinski <krupinski01@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ declare(strict_types=1);
|
||||
namespace KTXM\ProviderImap\Client;
|
||||
|
||||
use KTXM\ProviderImap\Client\Command\CommandInterface;
|
||||
use KTXM\ProviderImap\Client\FetchTarget;
|
||||
|
||||
interface ClientInterface
|
||||
{
|
||||
@@ -21,4 +22,11 @@ interface ClientInterface
|
||||
* @return TResult
|
||||
*/
|
||||
public function perform(CommandInterface $command): mixed;
|
||||
|
||||
/**
|
||||
* Stream the raw bytes of a single IMAP BODY section without buffering.
|
||||
*
|
||||
* @return \Generator<string> raw (transfer-encoded) bytes from the socket
|
||||
*/
|
||||
public function download(FetchTarget $target, string $section, int $chunkSize = 8192): \Generator;
|
||||
}
|
||||
Reference in New Issue
Block a user