Wishlist
in package
Table of Contents
- $customerId : CustomerId
- $items : WishlistItems
- create() : self
- Creates a new instance of Wishlist.
- customerId() : int
- Returns the Customer ID.
- items() : WishlistItems
- Returns the Wishlist Items.
- toArray() : array<string|int, mixed>
- Returns the contents of this Value Object as an array.
- __construct() : mixed
- Constructor
Properties
$customerId
private
CustomerId
$customerId
$items
private
WishlistItems
$items
Methods
create()
Creates a new instance of Wishlist.
public
static create(CustomerId $customerId, WishlistItems $items) : self
Parameters
- $customerId : CustomerId
- $items : WishlistItems
Return values
self —customerId()
Returns the Customer ID.
public
customerId() : int
Return values
int —items()
Returns the Wishlist Items.
public
items() : WishlistItems
Return values
WishlistItems —toArray()
Returns the contents of this Value Object as an array.
public
toArray([string $format = "Y-m-d" ]) : array<string|int, mixed>
Parameters
- $format : string = "Y-m-d"
Return values
array<string|int, mixed> —__construct()
Constructor
private
__construct(CustomerId $customerId, WishlistItems $items) : mixed
Parameters
- $customerId : CustomerId
- $items : WishlistItems