generated from Nodarx/template
32 lines
807 B
PHP
32 lines
807 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace KTXM\ProviderImap\Client;
|
|
|
|
use KTXM\ProviderImap\Client\Command\CommandInterface;
|
|
use KTXM\ProviderImap\Client\FetchTarget;
|
|
|
|
interface ClientInterface
|
|
{
|
|
public function connect(ConnectionConfig $config): void;
|
|
|
|
/**
|
|
* @return list<string>
|
|
*/
|
|
public function capabilities(): array;
|
|
|
|
/**
|
|
* @template TResult
|
|
* @param CommandInterface<TResult> $command
|
|
* @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;
|
|
} |