CustomerMemo
extends AbstractEventRaisingEntity
in package
Class CustomerMemo
Table of Contents
- $content : string
- $creationTime : DateTimeImmutable
- $creatorId : CreatorId
- $customerId : CustomerId
- $id : CustomerMemoId
- $raisedEvents : array<string|int, object>
- $updatedAtTime : DateTimeImmutable
- changeContent() : void
- Updates the content of the customer memo.
- content() : string
- Returns the content of the customer memo.
- create() : CustomerMemo
- Creates a new customer memo instance.
- creationTime() : string
- Returns the creation time of the customer memo.
- creatorId() : int
- Returns the customer/admin ID of the creator of the customer memo.
- customerId() : int
- Returns the customer ID of the customer memo.
- id() : int
- Returns the ID of the customer memo.
- releaseEvents() : array<string|int, object>
- toArray() : array<string|int, mixed>
- Returns the internal data structure of the customer memo.
- updatedAtTime() : string
- Returns the updated-at time of the customer memo.
- validateContent() : void
- Validates the given content and throws an exception if it's invalid for using it for a customer memo.
- raiseEvent() : void
- __construct() : mixed
- CustomerMemo constructor.
Properties
$content
private
string
$content
$creationTime
private
DateTimeImmutable
$creationTime
$creatorId
private
CreatorId
$creatorId
$customerId
private
CustomerId
$customerId
$id
private
CustomerMemoId
$id
$raisedEvents
private
array<string|int, object>
$raisedEvents
= []
$updatedAtTime
private
DateTimeImmutable
$updatedAtTime
Methods
changeContent()
Updates the content of the customer memo.
public
changeContent(string $content) : void
Parameters
- $content : string
Return values
void —content()
Returns the content of the customer memo.
public
content() : string
Return values
string —create()
Creates a new customer memo instance.
public
static create(CustomerMemoId $id, CustomerId $customerId, CreatorId $creatorId, string $content, DateTimeImmutable $creationTime, DateTimeImmutable $updatedAtTime) : CustomerMemo
Parameters
- $id : CustomerMemoId
- $customerId : CustomerId
- $creatorId : CreatorId
- $content : string
- $creationTime : DateTimeImmutable
- $updatedAtTime : DateTimeImmutable
Return values
CustomerMemo —creationTime()
Returns the creation time of the customer memo.
public
creationTime([string $datetimeFormat = 'Y-m-d H:i:s' ]) : string
Parameters
- $datetimeFormat : string = 'Y-m-d H:i:s'
Return values
string —creatorId()
Returns the customer/admin ID of the creator of the customer memo.
public
creatorId() : int
Return values
int —customerId()
Returns the customer ID of the customer memo.
public
customerId() : int
Return values
int —id()
Returns the ID of the customer memo.
public
id() : int
Return values
int —releaseEvents()
public
releaseEvents() : array<string|int, object>
Return values
array<string|int, object> —toArray()
Returns the internal data structure of the customer memo.
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> —updatedAtTime()
Returns the updated-at time of the customer memo.
public
updatedAtTime([string $datetimeFormat = 'Y-m-d H:i:s' ]) : string
Parameters
- $datetimeFormat : string = 'Y-m-d H:i:s'
Return values
string —validateContent()
Validates the given content and throws an exception if it's invalid for using it for a customer memo.
public
static validateContent(string $content) : void
Parameters
- $content : string
Return values
void —raiseEvent()
protected
raiseEvent(object $event) : void
Parameters
- $event : object
Return values
void —__construct()
CustomerMemo constructor.
private
__construct(CustomerMemoId $id, CustomerId $customerId, CreatorId $creatorId, string $content, DateTimeImmutable $creationTime, DateTimeImmutable $updatedAtTime) : mixed
Parameters
- $id : CustomerMemoId
- $customerId : CustomerId
- $creatorId : CreatorId
- $content : string
- $creationTime : DateTimeImmutable
- $updatedAtTime : DateTimeImmutable