ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMailValueObject Class Reference
+ Collaboration diagram for ilMailValueObject:

Public Member Functions

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

Private Attributes

readonly array $attachments
 

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 ( private readonly string  $from,
private readonly string  $recipients,
private readonly string  $recipientsCC,
private readonly string  $recipientsBCC,
private readonly string  $subject,
private readonly string  $body,
array  $attachments,
private readonly bool  $usePlaceholders = false,
private readonly bool  $saveInSentBox = false 
)
Parameters
string[]$attachments
Exceptions
InvalidArgumentException

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

References ilStr\strLen().

43  {
44  $this->attachments = array_filter(array_map('trim', $attachments));
45  if (ilStr::strLen($this->subject) > 255) {
46  throw new InvalidArgumentException('Subject must not be longer than 255 characters');
47  }
48  }
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 78 of file class.ilMailValueObject.php.

References $attachments.

78  : array
79  {
80  return $this->attachments;
81  }

◆ getBody()

ilMailValueObject::getBody ( )

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

70  : string
71  {
72  return $this->body;
73  }

◆ getFrom()

ilMailValueObject::getFrom ( )

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

93  : string
94  {
95  return $this->from;
96  }

◆ getRecipients()

ilMailValueObject::getRecipients ( )

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

50  : string
51  {
52  return $this->recipients;
53  }

◆ getRecipientsBCC()

ilMailValueObject::getRecipientsBCC ( )

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

60  : string
61  {
62  return $this->recipientsBCC;
63  }

◆ getRecipientsCC()

ilMailValueObject::getRecipientsCC ( )

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

55  : string
56  {
57  return $this->recipientsCC;
58  }

◆ getSubject()

ilMailValueObject::getSubject ( )

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

65  : string
66  {
67  return $this->subject;
68  }

◆ isUsingPlaceholders()

ilMailValueObject::isUsingPlaceholders ( )

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

83  : bool
84  {
85  return $this->usePlaceholders;
86  }

◆ shouldSaveInSentBox()

ilMailValueObject::shouldSaveInSentBox ( )

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

88  : bool
89  {
90  return $this->saveInSentBox;
91  }

Field Documentation

◆ $attachments

readonly array ilMailValueObject::$attachments
private

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

Referenced by getAttachments().


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