CustomerCartMapper
in package
Table of Contents
- $factory : ShoppingCartFactory
- __construct() : mixed
- Constructor
- mapShoppingCart() : ShoppingCart
- Maps the Date of a Shopping Cart with a given customer into a Shopping Cart instance
- mapShoppingCartItem() : ShoppingCartItem
- Maps the Data of a single Shopping Cart Item into a Shopping Cart Item instance.
Properties
$factory
private
ShoppingCartFactory
$factory
Methods
__construct()
Constructor
public
__construct(ShoppingCartFactory $factory) : mixed
Parameters
- $factory : ShoppingCartFactory
Return values
mixed —mapShoppingCart()
Maps the Date of a Shopping Cart with a given customer into a Shopping Cart instance
public
mapShoppingCart(array<string|int, mixed> $cartsData, CustomerId $customerId) : ShoppingCart
Parameters
- $cartsData : array<string|int, mixed>
- $customerId : CustomerId
Return values
ShoppingCart —mapShoppingCartItem()
Maps the Data of a single Shopping Cart Item into a Shopping Cart Item instance.
public
mapShoppingCartItem(array<string|int, mixed> $cartData) : ShoppingCartItem
Parameters
- $cartData : array<string|int, mixed>