ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
ILIAS\Mail\Service\MailService Class Reference
+ Collaboration diagram for ILIAS\Mail\Service\MailService:

Public Member Functions

 __construct (protected Container $dic)
 
 mime ()
 
 autoresponder ()
 
 textTemplates ()
 
 placeholderResolver ()
 
 templateEngineFactory ()
 
 signature ()
 

Static Public Member Functions

static init (Container $container)
 

Detailed Description

Definition at line 45 of file MailService.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Mail\Service\MailService::__construct ( protected Container  $dic)

Definition at line 47 of file MailService.php.

48 {
49 }

Member Function Documentation

◆ autoresponder()

ILIAS\Mail\Service\MailService::autoresponder ( )

Definition at line 169 of file MailService.php.

169 : AutoresponderService
170 {
171 return $this->dic[AutoresponderService::class];
172 }

◆ init()

static ILIAS\Mail\Service\MailService::init ( Container  $container)
static

Definition at line 51 of file MailService.php.

51 : void
52 {
53 $container[self::class] = static function (Container $c): self {
54 return new self($c);
55 };
56
57 $container[ilMailTemplateServiceInterface::class] = static function (Container $c): ilMailTemplateServiceInterface {
58 return new ilMailTemplateService(
59 new ilMailTemplateRepository($c->database()),
60 $c->mail()->templateEngineFactory()
61 );
62 };
63
64 $container[TemplateEngineFactoryInterface::class] = static function (Container $c): TemplateEngineFactoryInterface {
65 return $c->mail()->templateEngineFactory();
66 };
67
68 $container[MimeMailService::class] = static function (Container $c): MimeMailService {
69 return new MimeMailService($c);
70 };
71
72 $container['mail.mime.transport.factory'] = static function (Container $c): ilMailMimeTransportFactory {
73 return new ilMailMimeTransportFactory($c->settings(), $c->event(), $c->resourceStorage());
74 };
75
76 $container['mail.mime.sender.factory'] = static function (Container $c): ilMailMimeSenderFactory {
77 return new ilMailMimeSenderFactory(
78 $c->settings(),
79 $c->mail()->templateEngineFactory()
80 );
81 };
82
83 $container['mail.texttemplates.service'] = static function (Container $c): ilMailTemplateService {
84 return new ilMailTemplateService(
85 new ilMailTemplateRepository($c->database()),
86 $c->mail()->templateEngineFactory()
87 );
88 };
89
90 $container['mail.template.placeholder.resolver'] = static function (Container $c): ilMailTemplatePlaceholderResolver {
92 $c->mail()->templateEngineFactory()->getBasicEngine()
93 );
94 };
95
96 $container[AutoresponderService::class] = static function (Container $c): AutoresponderService {
97 return new AutoresponderServiceImpl(
98 (int) $c->settings()->get(
99 'mail_auto_responder_idle_time',
101 ),
102 false,
103 new AutoresponderDatabaseRepository($c->database()),
104 (new DataFactory())->clock()->utc()
105 );
106 };
107
108 $container[ilMailTemplatePlaceholderResolver::class] = static function (Container $c): ilMailTemplatePlaceholderResolver {
110 $c->mail()->templateEngineFactory()->getBasicEngine()
111 );
112 };
113
114 $container['mail.template_engine.factory'] = static function (Container $c): MustacheTemplateEngineFactory {
115 return new MustacheTemplateEngineFactory();
116 };
117
118 $container[MailAssets::class] = static function (Container $c): MailAssets {
119 $root = rtrim($c->iliasIni()->readVariable('server', 'absolute_path'), '/');
120
121 return new SkinnedMailAssets(
122 new PublishedMailAssets($root . '/public'),
123 $root . '/public/Customizing/skin',
124 new LogoByFileName(),
125 $c->clientIni()->readVariable('layout', 'skin'),
126 $c->clientIni()->readVariable('layout', 'style')
127 );
128 };
129
130 $container[PlainTextMailBodyComposer::class] = static fn(): PlainTextMailBodyComposer =>
131 new PlainTextMailBodyComposer();
132
133 $container[HtmlMailBodyComposer::class] = static function (Container $c): HtmlMailBodyComposer {
134 return new HtmlMailBodyComposer(
135 $c[MailAssets::class],
136 $c[PlainTextMailBodyComposer::class],
137 $c->ui()->factory(),
138 $c->ui()->renderer(),
139 $c->refinery(),
140 new DataFactory(),
143 );
144 };
145
146 $container[MailBodyComposer::class] = static function (Container $c): MailBodyComposer {
147 return new ConfiguredMailBodyComposer(
148 $c->settings(),
149 static fn(): MailBodyComposer => $c[HtmlMailBodyComposer::class],
150 $c[PlainTextMailBodyComposer::class]
151 );
152 };
153
154 $container['mail.signature.service'] = static function (Container $c): MailSignatureService {
155 return new MailSignatureService(
156 $c->mail()->templateEngineFactory(),
157 $c->clientIni(),
158 $c->language(),
159 $c->settings()
160 );
161 };
162 }
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:38
static _getHttpPath()
$container
@noRector
Definition: wac.php:39

References Vendor\Package\$c, $container, ilObjSystemFolder\_getHeaderTitle(), ilUtil\_getHttpPath(), and ILIAS\Mail\Autoresponder\AutoresponderService\AUTO_RESPONDER_DEFAULT_IDLE_TIME.

+ Here is the call graph for this function:

◆ mime()

ILIAS\Mail\Service\MailService::mime ( )

Definition at line 164 of file MailService.php.

164 : MimeMailService
165 {
166 return $this->dic[MimeMailService::class];
167 }

◆ placeholderResolver()

ILIAS\Mail\Service\MailService::placeholderResolver ( )

Definition at line 179 of file MailService.php.

180 {
181 return $this->dic[ilMailTemplatePlaceholderResolver::class];
182 }

◆ signature()

ILIAS\Mail\Service\MailService::signature ( )

Definition at line 190 of file MailService.php.

190 : MailSignatureService
191 {
192 return $this->dic['mail.signature.service'];
193 }

◆ templateEngineFactory()

ILIAS\Mail\Service\MailService::templateEngineFactory ( )

Definition at line 185 of file MailService.php.

185 : TemplateEngineFactoryInterface
186 {
187 return $this->dic['mail.template_engine.factory'];
188 }

◆ textTemplates()

ILIAS\Mail\Service\MailService::textTemplates ( )

Definition at line 174 of file MailService.php.

175 {
176 return $this->dic[ilMailTemplateServiceInterface::class];
177 }

The documentation for this class was generated from the following file: