mirror of
https://github.com/OpenXE-org/OpenXE.git
synced 2024-12-26 14:40:29 +01:00
44 lines
1.1 KiB
PHP
44 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Xentral\Components\MailClient;
|
|
|
|
use Xentral\Components\MailClient\Client\MimeMessageFormatter;
|
|
use Xentral\Components\MailClient\Client\MimeMessageFormatterInterface;
|
|
use Xentral\Core\DependencyInjection\ServiceContainer;
|
|
|
|
final class Bootstrap
|
|
{
|
|
/**
|
|
* @return array
|
|
*/
|
|
public static function registerServices(): array
|
|
{
|
|
return [
|
|
'MailClientFactory' => 'onInitMailClientFactory',
|
|
'MailClientMimeMessageFormatter' => 'onInitMimeMessageFormatter',
|
|
];
|
|
}
|
|
|
|
/**
|
|
* @param ServiceContainer $container
|
|
*
|
|
* @return MailClientFactory
|
|
*/
|
|
public static function onInitMailClientFactory(ServiceContainer $container): MailClientFactory
|
|
{
|
|
return new MailClientFactory();
|
|
}
|
|
|
|
/**
|
|
* @param ServiceContainer $container
|
|
*
|
|
* @return MimeMessageFormatterInterface
|
|
*/
|
|
public static function onInitMimeMessageFormatter(ServiceContainer $container): MimeMessageFormatterInterface
|
|
{
|
|
return new MimeMessageFormatter();
|
|
}
|
|
}
|