Files
provider_imap/lib/Client/Command/CommandInterface.php
2026-05-08 00:16:43 -04:00

30 lines
671 B
PHP

<?php
declare(strict_types=1);
namespace KTXM\ProviderImap\Client\Command;
use KTXM\ProviderImap\Client\Protocol\RequestFrame;
use KTXM\ProviderImap\Client\Protocol\ResponseStream;
use KTXM\ProviderImap\Client\SessionContext;
use KTXM\ProviderImap\Client\SessionState;
/**
* @template TResult
*/
interface CommandInterface
{
public function name(): string;
/**
* @return list<SessionState>
*/
public function allowedStates(): array;
public function encode(string $tag, SessionContext $context): RequestFrame;
/**
* @return TResult
*/
public function handle(ResponseStream $responses, SessionContext $context): mixed;
}