Files
nextcloud-mail/lib/IMAP/ImapMessageFetcherFactory.php
renovate[bot] e3ad01ea52 chore(deps): bump nextcloud/coding-standard from 1.3.1 to ^1.3.2 (main) (#10283)
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>
2024-10-24 14:46:12 +00:00

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,
);
}
}