Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
1 / 1
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5/** @license For full copyright and license information, please see the LICENSE.md file. */
6
7namespace App\Modules\Mail\Application\Service\Connection;
8
9defined('AMMONLY_APP') || exit('Direct script access is forbidden.');
10
11use App\Modules\Mail\Domain\Contract\MailProtocolDriverInterface;
12use App\Modules\Mail\Domain\Exception\WebmailAuthException;
13use App\Modules\Mail\Domain\Model\ClientMailbox;
14
15/**
16 * Contract for establishing and resolving authenticated protocol driver connections.
17 */
18interface WebmailConnectionManagerInterface
19{
20    /**
21     * Connects and returns an authenticated protocol driver for the given mailbox.
22     *
23     * @param ClientMailbox $mailbox Mailbox entity with encrypted credentials.
24     * @return MailProtocolDriverInterface Connected protocol driver.
25     * @throws WebmailAuthException When credentials decryption or driver connection fails.
26     */
27    public function connectDriver(ClientMailbox $mailbox): MailProtocolDriverInterface;
28}