19declare(strict_types=1);
30 private readonly
string $lang_code,
31 private readonly
string $subject =
'',
32 private readonly
string $body =
'',
33 private readonly
string $salutation_none_specific =
'',
34 private readonly
string $salutation_male =
'',
35 private readonly
string $salutation_female =
'',
36 private readonly ?
string $attachment_rid =
null,
37 private readonly ?
string $legacy_attachment_filename =
null
44 return $this->lang_code;
49 return $this->subject;
59 return $this->salutation_none_specific;
64 return $this->salutation_male;
69 return $this->salutation_female;
74 return $this->attachment_rid;
79 if ($this->attachment_rid !==
null) {
80 $rid = $irss->manage()->find($this->attachment_rid);
86 $this->temp_file_path . $this->lang_code,
87 $irss->manage()->getCurrentRevision($rid)->getTitle()
91 if ($this->legacy_attachment_filename !==
null) {
92 $path =
'/' . implode(
95 static fn(
string $path_part):
string => trim($path_part,
'/'),
103 return [
$path, $this->legacy_attachment_filename];
111 if (file_exists($this->temp_file_path . $this->lang_code)) {
112 unlink($this->temp_file_path . $this->lang_code);
132 if (file_exists($this->temp_file_path . $this->lang_code)) {
136 if (!file_exists($this->temp_file_path)) {
137 mkdir($this->temp_file_path);
141 $this->temp_file_path . $this->lang_code,
142 $irss->consume()->stream($rid)->getStream()->getContents()
Class ResourceIdentification.
getSalutationNoneSpecific()
__construct(private readonly string $lang_code, private readonly string $subject='', private readonly string $body='', private readonly string $salutation_none_specific='', private readonly string $salutation_male='', private readonly string $salutation_female='', private readonly ?string $attachment_rid=null, private readonly ?string $legacy_attachment_filename=null)
deleteAttachmentTempFile()
ensureAttachmentFileExists(ResourceStorage $irss, ResourceIdentification $rid)
getAttachment(ResourceStorage $irss)
RFC 822 Email address list validation Utility.
if(!file_exists('../ilias.ini.php'))