ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
ilMailValueObject Class Reference
+ Collaboration diagram for ilMailValueObject:

Public Member Functions

 __construct (private readonly string $from, private readonly string $recipients, private readonly string $recipients_cc, private readonly string $recipients_bcc, private readonly string $subject, private readonly string $body, array $attachments, private readonly bool $use_placeholders=false, private readonly bool $save_in_sent_box=false)
 
 getRecipients ()
 
 getRecipientsCC ()
 
 getRecipientsBCC ()
 
 getSubject ()
 
 getBody ()
 
 getAttachments ()
 
 isUsingPlaceholders ()
 
 shouldSaveInSentBox ()
 
 getFrom ()
 

Private Attributes

readonly array $attachments
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilMailValueObject::__construct ( private readonly string  $from,
private readonly string  $recipients,
private readonly string  $recipients_cc,
private readonly string  $recipients_bcc,
private readonly string  $subject,
private readonly string  $body,
array  $attachments,
private readonly bool  $use_placeholders = false,
private readonly bool  $save_in_sent_box = false 
)
Parameters
list<string>$attachments
Exceptions
InvalidArgumentException

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

References ilStr\strLen().

40  {
41  $this->attachments = array_filter(array_map('trim', $attachments));
42  if (ilStr::strLen($this->subject) > 255) {
43  throw new InvalidArgumentException('Subject must not be longer than 255 characters');
44  }
45  }
static strLen(string $a_string)
Definition: class.ilStr.php:60
+ Here is the call graph for this function:

Member Function Documentation

◆ getAttachments()

ilMailValueObject::getAttachments ( )
Returns
list<string>

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

References $attachments.

75  : array
76  {
77  return $this->attachments;
78  }

◆ getBody()

ilMailValueObject::getBody ( )

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

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

◆ getFrom()

ilMailValueObject::getFrom ( )

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

90  : string
91  {
92  return $this->from;
93  }

◆ getRecipients()

ilMailValueObject::getRecipients ( )

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

47  : string
48  {
49  return $this->recipients;
50  }

◆ getRecipientsBCC()

ilMailValueObject::getRecipientsBCC ( )

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

57  : string
58  {
59  return $this->recipients_bcc;
60  }

◆ getRecipientsCC()

ilMailValueObject::getRecipientsCC ( )

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

52  : string
53  {
54  return $this->recipients_cc;
55  }

◆ getSubject()

ilMailValueObject::getSubject ( )

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

62  : string
63  {
64  return $this->subject;
65  }

◆ isUsingPlaceholders()

ilMailValueObject::isUsingPlaceholders ( )

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

80  : bool
81  {
82  return $this->use_placeholders;
83  }

◆ shouldSaveInSentBox()

ilMailValueObject::shouldSaveInSentBox ( )

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

85  : bool
86  {
87  return $this->save_in_sent_box;
88  }

Field Documentation

◆ $attachments

readonly array ilMailValueObject::$attachments
private

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

Referenced by getAttachments().


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