ILIAS  release_8 Revision v8.23
ilMailValueObject Class Reference
+ Collaboration diagram for ilMailValueObject:

Public Member Functions

 __construct (string $from, string $recipients, string $recipientsCC, string $recipientsBCC, string $subject, string $body, array $attachments, bool $usePlaceholders=false, bool $saveInSentBox=false)
 
 getRecipients ()
 
 getRecipientsCC ()
 
 getRecipientsBCC ()
 
 getSubject ()
 
 getBody ()
 
 getAttachments ()
 
 isUsingPlaceholders ()
 
 shouldSaveInSentBox ()
 
 getFrom ()
 

Private Attributes

string $recipients
 
string $recipientsCC
 
string $recipientsBCC
 
string $subject
 
string $body
 
array $attachments
 
bool $usePlaceholders
 
bool $saveInSentBox
 
string $from
 

Detailed Description

Author
Niels Theen nthee.nosp@m.n@da.nosp@m.tabay.nosp@m..de

Definition at line 24 of file class.ilMailValueObject.php.

Constructor & Destructor Documentation

◆ __construct()

ilMailValueObject::__construct ( string  $from,
string  $recipients,
string  $recipientsCC,
string  $recipientsBCC,
string  $subject,
string  $body,
array  $attachments,
bool  $usePlaceholders = false,
bool  $saveInSentBox = false 
)
Parameters
string[]$attachments
Exceptions
InvalidArgumentException

Definition at line 41 of file class.ilMailValueObject.php.

References $body, $from, $recipients, $recipientsBCC, $recipientsCC, $saveInSentBox, $subject, $usePlaceholders, and ilStr\strLen().

51  {
52  if (ilStr::strLen($subject) > 255) {
53  throw new InvalidArgumentException('Subject must not be longer than 255 characters');
54  }
55 
56  $this->from = $from;
57  $this->recipients = $recipients;
58  $this->recipientsCC = $recipientsCC;
59  $this->recipientsBCC = $recipientsBCC;
60  $this->subject = $subject;
61  $this->body = $body;
62  $this->attachments = array_filter(array_map('trim', $attachments));
63  $this->usePlaceholders = $usePlaceholders;
64  $this->saveInSentBox = $saveInSentBox;
65  }
static strLen(string $a_string)
Definition: class.ilStr.php:63
+ Here is the call graph for this function:

Member Function Documentation

◆ getAttachments()

ilMailValueObject::getAttachments ( )
Returns
string[]

Definition at line 95 of file class.ilMailValueObject.php.

References $attachments.

95  : array
96  {
97  return $this->attachments;
98  }

◆ getBody()

ilMailValueObject::getBody ( )

Definition at line 87 of file class.ilMailValueObject.php.

References $body.

87  : string
88  {
89  return $this->body;
90  }

◆ getFrom()

ilMailValueObject::getFrom ( )

Definition at line 110 of file class.ilMailValueObject.php.

References $from.

110  : string
111  {
112  return $this->from;
113  }

◆ getRecipients()

ilMailValueObject::getRecipients ( )

Definition at line 67 of file class.ilMailValueObject.php.

References $recipients.

67  : string
68  {
69  return $this->recipients;
70  }

◆ getRecipientsBCC()

ilMailValueObject::getRecipientsBCC ( )

Definition at line 77 of file class.ilMailValueObject.php.

References $recipientsBCC.

77  : string
78  {
79  return $this->recipientsBCC;
80  }

◆ getRecipientsCC()

ilMailValueObject::getRecipientsCC ( )

Definition at line 72 of file class.ilMailValueObject.php.

References $recipientsCC.

72  : string
73  {
74  return $this->recipientsCC;
75  }

◆ getSubject()

ilMailValueObject::getSubject ( )

Definition at line 82 of file class.ilMailValueObject.php.

References $subject.

82  : string
83  {
84  return $this->subject;
85  }

◆ isUsingPlaceholders()

ilMailValueObject::isUsingPlaceholders ( )

Definition at line 100 of file class.ilMailValueObject.php.

References $usePlaceholders.

100  : bool
101  {
102  return $this->usePlaceholders;
103  }

◆ shouldSaveInSentBox()

ilMailValueObject::shouldSaveInSentBox ( )

Definition at line 105 of file class.ilMailValueObject.php.

References $saveInSentBox.

105  : bool
106  {
107  return $this->saveInSentBox;
108  }

Field Documentation

◆ $attachments

array ilMailValueObject::$attachments
private

Definition at line 32 of file class.ilMailValueObject.php.

Referenced by getAttachments().

◆ $body

string ilMailValueObject::$body
private

Definition at line 30 of file class.ilMailValueObject.php.

Referenced by __construct(), and getBody().

◆ $from

string ilMailValueObject::$from
private

Definition at line 35 of file class.ilMailValueObject.php.

Referenced by __construct(), and getFrom().

◆ $recipients

string ilMailValueObject::$recipients
private

Definition at line 26 of file class.ilMailValueObject.php.

Referenced by __construct(), and getRecipients().

◆ $recipientsBCC

string ilMailValueObject::$recipientsBCC
private

Definition at line 28 of file class.ilMailValueObject.php.

Referenced by __construct(), and getRecipientsBCC().

◆ $recipientsCC

string ilMailValueObject::$recipientsCC
private

Definition at line 27 of file class.ilMailValueObject.php.

Referenced by __construct(), and getRecipientsCC().

◆ $saveInSentBox

bool ilMailValueObject::$saveInSentBox
private

Definition at line 34 of file class.ilMailValueObject.php.

Referenced by __construct(), and shouldSaveInSentBox().

◆ $subject

string ilMailValueObject::$subject
private

Definition at line 29 of file class.ilMailValueObject.php.

Referenced by __construct(), and getSubject().

◆ $usePlaceholders

bool ilMailValueObject::$usePlaceholders
private

Definition at line 33 of file class.ilMailValueObject.php.

Referenced by __construct(), and isUsingPlaceholders().


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