ProposeAnnouncementDTO
in package
Read onlyYes
FinalYes
Data Transfer Object for proposing announcements
Table of Contents
Properties
- $text : string
- $title : string
- $validUntil : DateTimeImmutable
Methods
- __construct() : mixed
- fromArray() : self
- Creates DTO from an array
Properties
$text
public
string
$text
$title
public
string
$title
$validUntil
public
DateTimeImmutable
$validUntil
Methods
__construct()
public
__construct(string $title, string $text, DateTimeImmutable $validUntil) : mixed
Parameters
- $title : string
- $text : string
- $validUntil : DateTimeImmutable
fromArray()
Creates DTO from an array
public
static fromArray(array<string|int, mixed> $array, DateTimeImmutable $defaultValidUntil) : self
Parameters
- $array : array<string|int, mixed>
- $defaultValidUntil : DateTimeImmutable