generated from Nodarx/template
30 lines
671 B
PHP
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;
|
|
} |