CustomerHistoryEntry
extends AbstractEventRaisingEntity
in package
Class CustomerHistoryEntry
Table of Contents
- $customerId : CustomerId
- $date : DateTimeImmutable
- $payload : array<string|int, mixed>
- $raisedEvents : array<string|int, object>
- $type : string
- create() : CustomerHistoryEntry
- customerId() : int
- date() : string
- payload() : array<string|int, mixed>
- releaseEvents() : array<string|int, object>
- toArray() : array<string|int, mixed>
- type() : string
- raiseEvent() : void
- __construct() : mixed
Properties
$customerId
private
CustomerId
$customerId
$date
private
DateTimeImmutable
$date
$payload
private
array<string|int, mixed>
$payload
$raisedEvents
private
array<string|int, object>
$raisedEvents
= []
$type
private
string
$type
Methods
create()
public
static create(CustomerId $customerId, array<string|int, mixed> $payload, string $type, DateTimeImmutable $date) : CustomerHistoryEntry
Parameters
- $customerId : CustomerId
- $payload : array<string|int, mixed>
- $type : string
- $date : DateTimeImmutable
Return values
CustomerHistoryEntry —customerId()
public
customerId() : int
Return values
int —date()
public
date([string $datetimeFormat = 'Y-m-d H:i:s' ]) : string
Parameters
- $datetimeFormat : string = 'Y-m-d H:i:s'
Return values
string —payload()
public
payload() : array<string|int, mixed>
Return values
array<string|int, mixed> —releaseEvents()
public
releaseEvents() : array<string|int, object>
Return values
array<string|int, object> —toArray()
public
toArray([string $datetimeFormat = 'Y-m-d H:i:s' ]) : array<string|int, mixed>
Parameters
- $datetimeFormat : string = 'Y-m-d H:i:s'
Return values
array<string|int, mixed> —type()
public
type() : string
Return values
string —raiseEvent()
protected
raiseEvent(object $event) : void
Parameters
- $event : object
Return values
void —__construct()
private
__construct(CustomerId $customerId, array<string|int, mixed> $payload, string $type, DateTimeImmutable $date) : mixed
Parameters
- $customerId : CustomerId
- $payload : array<string|int, mixed>
- $type : string
- $date : DateTimeImmutable