CustomerReview
in package
Class CustomerReview
Table of Contents
- $creationTime : DateTimeImmutable
- $customerId : CustomerId
- $productId : int
- $rating : int
- $reviewId : ReviewId
- $text : ReviewText
- code() : string
- create() : CustomerReview
- creationTime() : string
- Returns the creation time of the customer memo.
- customerId() : int
- productId() : int
- rating() : int
- reviewId() : int
- text() : string
- toArray() : array<string|int, mixed>
- __construct() : mixed
Properties
$creationTime
private
DateTimeImmutable
$creationTime
$customerId
private
CustomerId
$customerId
$productId
private
int
$productId
$rating
private
int
$rating
$reviewId
private
ReviewId
$reviewId
$text
private
ReviewText
$text
Methods
code()
public
code() : string
Return values
string —create()
public
static create(ReviewId $reviewId, CustomerId $customerId, int $productId, ReviewText $text, DateTimeImmutable $creationTime, int $rating) : CustomerReview
Parameters
- $reviewId : ReviewId
- $customerId : CustomerId
- $productId : int
- $text : ReviewText
- $creationTime : DateTimeImmutable
- $rating : int
Return values
CustomerReview —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 —customerId()
public
customerId() : int
Return values
int —productId()
public
productId() : int
Return values
int —rating()
public
rating() : int
Return values
int —reviewId()
public
reviewId() : int
Return values
int —text()
public
text() : string
Return values
string —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> —__construct()
private
__construct(ReviewId $reviewId, CustomerId $customerId, int $productId, ReviewText $text, DateTimeImmutable $creationTime, int $rating) : mixed
Parameters
- $reviewId : ReviewId
- $customerId : CustomerId
- $productId : int
- $text : ReviewText
- $creationTime : DateTimeImmutable
- $rating : int