mirror of
https://github.com/nextcloud/mail.git
synced 2026-01-13 20:23:59 +00:00
chore(deps): bump nextcloud/coding-standard from 1.3.1 to ^1.3.2 Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
50 lines
1.2 KiB
PHP
50 lines
1.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
/**
|
|
* SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
|
*/
|
|
|
|
namespace OCA\Mail\IMAP;
|
|
|
|
use Horde_Imap_Client_Base;
|
|
use OCA\Mail\IMAP\Charset\Converter;
|
|
use OCA\Mail\Service\Html;
|
|
use OCA\Mail\Service\PhishingDetection\PhishingDetectionService;
|
|
use OCA\Mail\Service\SmimeService;
|
|
|
|
class ImapMessageFetcherFactory {
|
|
private Html $htmlService;
|
|
private SmimeService $smimeService;
|
|
private Converter $charsetConverter;
|
|
private PhishingDetectionService $phishingDetectionService;
|
|
|
|
public function __construct(Html $htmlService,
|
|
SmimeService $smimeService,
|
|
Converter $charsetConverter,
|
|
PhishingDetectionService $phishingDetectionService) {
|
|
$this->htmlService = $htmlService;
|
|
$this->smimeService = $smimeService;
|
|
$this->charsetConverter = $charsetConverter;
|
|
$this->phishingDetectionService = $phishingDetectionService;
|
|
}
|
|
|
|
public function build(int $uid,
|
|
string $mailbox,
|
|
Horde_Imap_Client_Base $client,
|
|
string $userId): ImapMessageFetcher {
|
|
return new ImapMessageFetcher(
|
|
$uid,
|
|
$mailbox,
|
|
$client,
|
|
$userId,
|
|
$this->htmlService,
|
|
$this->smimeService,
|
|
$this->charsetConverter,
|
|
$this->phishingDetectionService,
|
|
);
|
|
}
|
|
}
|