ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilMailValueObject.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
3
8{
10 private $recipients;
11
14
17
19 private $subject;
20
22 private $body;
23
25 private $attachments = [];
26
29
32
34 private $from;
35
47 public function __construct(
48 string $from,
49 string $recipients,
50 string $recipientsCC,
51 string $recipientsBCC,
52 string $subject,
53 string $body,
54 array $attachments,
55 bool $usePlaceholders = false,
56 bool $saveInSentBox = false
57 ) {
58 $this->from = $from;
59 $this->recipients = $recipients;
60 $this->recipientsCC = $recipientsCC;
61 $this->recipientsBCC = $recipientsBCC;
62 $this->subject = $subject;
63 $this->body = $body;
64 $this->attachments = array_filter(array_map('trim', $attachments));
65 $this->usePlaceholders = $usePlaceholders;
66 $this->saveInSentBox = $saveInSentBox;
67 }
68
72 public function getRecipients() : string
73 {
74 return $this->recipients;
75 }
76
80 public function getRecipientsCC() : string
81 {
83 }
84
88 public function getRecipientsBCC() : string
89 {
91 }
92
96 public function getSubject() : string
97 {
98 return $this->subject;
99 }
100
104 public function getBody() : string
105 {
106 return $this->body;
107 }
108
112 public function getAttachments() : array
113 {
114 return $this->attachments;
115 }
116
120 public function isUsingPlaceholders() : bool
121 {
123 }
124
128 public function shouldSaveInSentBox() : bool
129 {
131 }
132
136 public function getFrom() : string
137 {
138 return $this->from;
139 }
140}
An exception for terminatinating execution or to throw for unit testing.
__construct(string $from, string $recipients, string $recipientsCC, string $recipientsBCC, string $subject, string $body, array $attachments, bool $usePlaceholders=false, bool $saveInSentBox=false)