Countdown
in package
Countdown entity
Table of Contents
Properties
- $countTo : DateTimeImmutable
- $id : int|null
- $title : string
- $userId : int
- $events : array<string|int, DomainEvent>
Methods
- __construct() : mixed
- assignId() : void
- clearDomainEvents() : void
- getDomainEvents() : array<string|int, DomainEvent>
- markCreated() : void
- markDeleted() : void
- updateDetails() : void
- recordEvent() : void
Properties
$countTo
public
DateTimeImmutable
$countTo
$id
public
int|null
$id
$title
public
string
$title
$userId
public
int
$userId
$events
private
array<string|int, DomainEvent>
$events
= []
Methods
__construct()
public
__construct(int|null $id, string $title, DateTimeImmutable $countTo, int $userId) : mixed
Parameters
- $id : int|null
- $title : string
- $countTo : DateTimeImmutable
- $userId : int
assignId()
public
assignId(int $id) : void
Parameters
- $id : int
clearDomainEvents()
public
clearDomainEvents() : void
getDomainEvents()
public
getDomainEvents() : array<string|int, DomainEvent>
Return values
array<string|int, DomainEvent>markCreated()
public
markCreated() : void
markDeleted()
public
markDeleted() : void
updateDetails()
public
updateDetails(string $title, DateTimeImmutable $countTo, int $userId) : void
Parameters
- $title : string
- $countTo : DateTimeImmutable
- $userId : int
recordEvent()
private
recordEvent(DomainEvent $event) : void
Parameters
- $event : DomainEvent